diff --git a/scp/tickets.php b/scp/tickets.php index 66af215ea732a492b5f9e99cf5b0d99c16ebdb6c..8c799a2a6a02a26c4185afece329ffc5e57cdcf4 100644 --- a/scp/tickets.php +++ b/scp/tickets.php @@ -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!'; }