From 4fc4ce88c14b92531674f1606277e798ed5dc165 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 13 Jul 2015 21:11:07 -0500 Subject: [PATCH] Fix crash changing ticket status from listing page --- include/ajax.tickets.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php index 6b1c6cd6e..cf86c4930 100644 --- a/include/ajax.tickets.php +++ b/include/ajax.tickets.php @@ -495,12 +495,12 @@ class TicketsAjaxAPI extends AjaxController { $state = 'open'; break; case 'close': - if (!$thisstaff->hasPerm(TicketModel::PERM_CLOSE)) + if (!$thisstaff->hasPerm(TicketModel::PERM_CLOSE, false)) Http::response(403, 'Access denied'); $state = 'closed'; break; case 'delete': - if (!$thisstaff->hasPerm(TicketModel::PERM_DELETE)) + if (!$thisstaff->hasPerm(TicketModel::PERM_DELETE, false)) Http::response(403, 'Access denied'); $state = 'deleted'; @@ -534,18 +534,18 @@ class TicketsAjaxAPI extends AjaxController { // Make sure the agent has permission to set the status switch(mb_strtolower($status->getState())) { case 'open': - if (!$thisstaff->hasPerm(TicketModel::PERM_CLOSE) - && !$thisstaff->hasPerm(TicketModel::PERM_CREATE)) + if (!$thisstaff->hasPerm(TicketModel::PERM_CLOSE, false) + && !$thisstaff->hasPerm(TicketModel::PERM_CREATE, false)) $errors['err'] = sprintf(__('You do not have permission %s.'), __('to reopen tickets')); break; case 'closed': - if (!$thisstaff->hasPerm(TicketModel::PERM_CLOSE)) + if (!$thisstaff->hasPerm(TicketModel::PERM_CLOSE, false)) $errors['err'] = sprintf(__('You do not have permission %s.'), __('to resolve/close tickets')); break; case 'deleted': - if (!$thisstaff->hasPerm(TicketModel::PERM_DELETE)) + if (!$thisstaff->hasPerm(TicketModel::PERM_DELETE, false)) $errors['err'] = sprintf(__('You do not have permission %s.'), __('to archive/delete tickets')); break; -- GitLab