Skip to content

Commit

Permalink
Fix associate items to ticket permission mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainLvr authored Nov 20, 2023
1 parent 43a1770 commit 996ccd2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -4417,7 +4417,12 @@ public function showForm($ID, array $options = [])
$ola = new OLA();
$item_ticket = null;

$options['_canupdate'] = Session::haveRight('ticket', CREATE);
if ($this->isNewItem()) {
$options['_canupdate'] = Session::haveRight('ticket', CREATE);
} else {
$options['_canupdate'] = Session::haveRight('ticket', UPDATE);
}

if ($options['_canupdate']) {
$item_ticket = new Item_Ticket();
}
Expand Down

0 comments on commit 996ccd2

Please sign in to comment.