From a6f6687b468a81a0f96c108faefbfc69dd607acf Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 23 Feb 2019 22:02:58 +0000 Subject: [PATCH] Adjusted client access to unapproved records. --- WEB-INF/lib/ttReportHelper.class.php | 2 ++ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 441cbec9..ac3582e6 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -1054,6 +1054,8 @@ class ttReportHelper { $options['invoice'] = $bean->getAttribute('invoice'); $options['paid_status'] = $bean->getAttribute('paid_status'); $options['timesheet'] = $bean->getAttribute('timesheet'); + if ($user->isPluginEnabled('ts') && $user->isClient() && !$user->can('view_client_unapproved')) + $options['timesheet'] = TIMESHEET_APPROVED; // Restrict clients to approved timesheet records only. if (is_array($bean->getAttribute('users'))) $options['users'] = join(',', $bean->getAttribute('users')); $options['period'] = $bean->getAttribute('period'); $options['period_start'] = $bean->getAttribute('start_date'); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d0cc37fd..a0366229 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.41.4763 | Copyright © Anuko | +  Anuko Time Tracker 1.18.41.4764 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1