Improved sfety of inner join for timesheet assignment.
[timetracker.git] / reports.php
index 5700025..fb74e16 100644 (file)
@@ -192,9 +192,7 @@ if ($showApproved) {
 }
 
 // Add timesheet assignment selector.
-$showTimesheetDropdown = $user->isPluginEnabled('ts') &&
-  ($user->can('view_own_timesheets') || $user->can('view_timesheets') ||
-   $user->can('view_all_timesheets') || ($user->can('view_client_timesheets')));
+$showTimesheetDropdown = $user->isPluginEnabled('ts');
 if ($showTimesheetDropdown) {
   $form->addInput(array('type'=>'combobox',
    'name'=>'timesheet',
@@ -207,9 +205,7 @@ if ($showTimesheetDropdown) {
    'empty'=>array(''=>$i18n->get('dropdown.all'))
   ));
 }
-$showTimesheetCheckbox = $user->isPluginEnabled('ts') &&
-  ($user->can('view_own_timesheets') || $user->can('view_timesheets') ||
-   $user->can('view_all_timesheets') || $user->can('view_client_timesheets'));
+$showTimesheetCheckbox = $user->isPluginEnabled('ts');
 
 // Add user table.
 $showUsers = $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient();