From 997481e8d75cb192c12b1c38f71021fd27105777 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 14 Apr 2018 12:51:57 +0000 Subject: [PATCH] More refactoring. --- WEB-INF/templates/footer.tpl | 2 +- reports.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 09a969e4..3ff2dda3 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.88.4265 | Copyright © Anuko | +  Anuko Time Tracker 1.17.88.4266 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/reports.php b/reports.php index bc6d8fc0..fcefd047 100644 --- a/reports.php +++ b/reports.php @@ -194,11 +194,11 @@ $form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'end_date')) // Add checkboxes for fields. if ($user->isPluginEnabled('cl')) $form->addInput(array('type'=>'checkbox','name'=>'chclient')); -if (($user->canManageTeam() || $user->isClient()) && $user->isPluginEnabled('iv')) +if (($user->can('manage_invoices') || $user->isClient()) && $user->isPluginEnabled('iv')) $form->addInput(array('type'=>'checkbox','name'=>'chinvoice')); -if ($user->canManageTeam() && $user->isPluginEnabled('ps')) +if ($user->can('manage_invoices') && $user->isPluginEnabled('ps')) $form->addInput(array('type'=>'checkbox','name'=>'chpaid')); -if ($user->canManageTeam()) +if ($user->can('view_reports') || $user->can('view_all_reports')) $form->addInput(array('type'=>'checkbox','name'=>'chip')); if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) $form->addInput(array('type'=>'checkbox','name'=>'chproject')); @@ -217,7 +217,7 @@ if ($custom_fields && $custom_fields->fields[0]) // Add group by control. $group_by_options['no_grouping'] = $i18n->get('form.reports.group_by_no'); $group_by_options['date'] = $i18n->get('form.reports.group_by_date'); -if ($user->canManageTeam() || $user->isClient()) +if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) $group_by_options['user'] = $i18n->get('form.reports.group_by_user'); if ($user->isPluginEnabled('cl') && !($user->isClient() && $user->client_id)) $group_by_options['client'] = $i18n->get('form.reports.group_by_client'); -- 2.20.1