Skip to content
Snippets Groups Projects
Commit 4573a1f1 authored by Peter Rotich's avatar Peter Rotich
Browse files

tasks: Mass actions perm.

parent ba7b77fe
Branches
Tags
No related merge requests found
...@@ -240,7 +240,7 @@ class TasksAjaxAPI extends AjaxController { ...@@ -240,7 +240,7 @@ class TasksAjaxAPI extends AjaxController {
} }
// Check generic permissions -- department specific permissions // Check generic permissions -- department specific permissions
// will be checked below. // will be checked below.
if ($perm && !$thisstaff->hasPerm($perm)) if ($perm && !$thisstaff->hasPerm($perm, false))
$errors['err'] = sprintf( $errors['err'] = sprintf(
__('You do not have permission to %s %s'), __('You do not have permission to %s %s'),
__($action), __($action),
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
$actions = array(); $actions = array();
if ($agent->hasPerm(Task::PERM_CLOSE)) { if ($agent->hasPerm(Task::PERM_CLOSE, false)) {
if (isset($options['status'])) { if (isset($options['status'])) {
$status = $options['status']; $status = $options['status'];
...@@ -59,7 +59,7 @@ if ($agent->hasPerm(Task::PERM_CLOSE)) { ...@@ -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( $actions += array(
'assign' => array( 'assign' => array(
'icon' => 'icon-user', 'icon' => 'icon-user',
...@@ -67,7 +67,7 @@ if ($agent->hasPerm(Task::PERM_ASSIGN)) { ...@@ -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( $actions += array(
'transfer' => array( 'transfer' => array(
'icon' => 'icon-share', 'icon' => 'icon-share',
...@@ -75,7 +75,7 @@ if ($agent->hasPerm(Task::PERM_TRANSFER)) { ...@@ -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( $actions += array(
'delete' => array( 'delete' => array(
'icon' => 'icon-trash', 'icon' => 'icon-trash',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment