Skip to content

Commit

Permalink
Bugfix redirect message when escalating ticket (#264)
Browse files Browse the repository at this point in the history
* bugfix redirect message when escalating ticket

* Apply suggestions from code review

---------

Co-authored-by: Romain B. <[email protected]>
  • Loading branch information
ArthurMinfotel and Rom1-B authored Dec 10, 2024
1 parent 22c4333 commit 6f52b11
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions front/ticket.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

include('../../../inc/includes.php');

/** @var array $CFG_GLPI */
global $CFG_GLPI;

if (isset($_POST['escalate'])) {
$group_id = (int)$_POST['groups_id'];
$tickets_id = (int)$_POST['tickets_id'];
Expand Down Expand Up @@ -87,6 +90,8 @@
]);
}

$track = new Ticket();

if (!$track->can($_POST["tickets_id"], READ)) {
Session::addMessageAfterRedirect(
__('You have been redirected because you no longer have access to this ticket'),
Expand Down

0 comments on commit 6f52b11

Please sign in to comment.