diff --git a/include/ajax.tasks.php b/include/ajax.tasks.php index a8237e19fbf8b42921cd927f7aa73ff1d36fc4d3..31ce73c4835f1f8384c5fc9f6cc6f4f59459519e 100644 --- a/include/ajax.tasks.php +++ b/include/ajax.tasks.php @@ -240,7 +240,7 @@ class TasksAjaxAPI extends AjaxController { } // Check generic permissions -- department specific permissions // will be checked below. - if ($perm && !$thisstaff->hasPerm($perm)) + if ($perm && !$thisstaff->hasPerm($perm, false)) $errors['err'] = sprintf( __('You do not have permission to %s %s'), __($action), diff --git a/include/staff/templates/tasks-actions.tmpl.php b/include/staff/templates/tasks-actions.tmpl.php index 94fc18a19054665d849522c5e305b1a7b0103783..e5407d2ed902e702d023fda00ba497842d35f8a6 100644 --- a/include/staff/templates/tasks-actions.tmpl.php +++ b/include/staff/templates/tasks-actions.tmpl.php @@ -3,7 +3,7 @@ $actions = array(); -if ($agent->hasPerm(Task::PERM_CLOSE)) { +if ($agent->hasPerm(Task::PERM_CLOSE, false)) { if (isset($options['status'])) { $status = $options['status']; @@ -59,7 +59,7 @@ if ($agent->hasPerm(Task::PERM_CLOSE)) { } } -if ($agent->hasPerm(Task::PERM_ASSIGN)) { +if ($agent->hasPerm(Task::PERM_ASSIGN, false)) { $actions += array( 'assign' => array( 'icon' => 'icon-user', @@ -67,7 +67,7 @@ if ($agent->hasPerm(Task::PERM_ASSIGN)) { )); } -if ($agent->hasPerm(Task::PERM_TRANSFER)) { +if ($agent->hasPerm(Task::PERM_TRANSFER, false)) { $actions += array( 'transfer' => array( 'icon' => 'icon-share', @@ -75,7 +75,7 @@ if ($agent->hasPerm(Task::PERM_TRANSFER)) { )); } -if ($agent->hasPerm(Task::PERM_DELETE)) { +if ($agent->hasPerm(Task::PERM_DELETE, false)) { $actions += array( 'delete' => array( 'icon' => 'icon-trash',