A fix for fav reports sent to clients.
authorNik Okuntseff <support@anuko.com>
Tue, 26 Feb 2019 21:16:58 +0000 (21:16 +0000)
committerNik Okuntseff <support@anuko.com>
Tue, 26 Feb 2019 21:16:58 +0000 (21:16 +0000)
WEB-INF/lib/ttFavReportHelper.class.php
WEB-INF/templates/footer.tpl

index 97f7e47..694bb59 100644 (file)
@@ -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;
   }
 }
index 80072db..39d8eb7 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.45.4784 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.45.4785 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>