From 4573a1f1a49ec1eea40e1e50eab3adfa2adc52da Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Mon, 13 Jul 2015 05:55:13 +0000 Subject: [PATCH] tasks: Mass actions perm. --- include/ajax.tasks.php | 2 +- include/staff/templates/tasks-actions.tmpl.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/ajax.tasks.php b/include/ajax.tasks.php index a8237e19f..31ce73c48 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 94fc18a19..e5407d2ed 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', -- GitLab