From: Nik Okuntseff Date: Tue, 26 Feb 2019 21:16:58 +0000 (+0000) Subject: A fix for fav reports sent to clients. X-Git-Tag: timetracker_1.19-1~261 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7dff008c1343e02229a5607df059a7db4774f975;p=timetracker.git A fix for fav reports sent to clients. --- diff --git a/WEB-INF/lib/ttFavReportHelper.class.php b/WEB-INF/lib/ttFavReportHelper.class.php index 97f7e47a..694bb594 100644 --- a/WEB-INF/lib/ttFavReportHelper.class.php +++ b/WEB-INF/lib/ttFavReportHelper.class.php @@ -414,7 +414,7 @@ class ttFavReportHelper { return $options; } - // adjustOptions takes and array or report options and adjusts them for current user + // adjustOptions takes an array or report options and adjusts them for current user // (and group) settings. This is needed in situations when a fav report is stored in db // long ago, but user or group attributes are now changed, so we have to adjust. static function adjustOptions($options) { @@ -457,6 +457,9 @@ class ttFavReportHelper { // TODO: add checking the existing user list for potentially changed access rights for user. } + if ($user->isPluginEnabled('ap') && $user->isClient() && !$user->can('view_client_unapproved')) + $options['approved'] = 1; // Restrict clients to approved records only. + return $options; } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 80072db4..39d8eb77 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.45.4784 | Copyright © Anuko | +  Anuko Time Tracker 1.18.45.4785 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}