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

Check access post-update - make sure staff still has access to ticket

parent 9ceed946
No related branches found
No related tags found
No related merge requests found
......@@ -163,7 +163,10 @@ if($_POST && !$errors):
$errors['err']='Perm. Denied. You are not allowed to edit tickets';
elseif($ticket->update($_POST,$errors)) {
$msg='Ticket updated successfully';
$_REQUEST['a'] = null;
$_REQUEST['a'] = null; //Clear edit action - going back to view.
//Check to make sure the staff STILL has access post-update (e.g dept change).
if(!$ticket->checkStaffAccess($thisstaff))
$ticket=null;
} elseif(!$errors['err']) {
$errors['err']='Unable to update the ticket. Correct the errors below and try again!';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment