Fix right check on thirdparty set on ticket card

This commit is contained in:
Maxime Kohlhaas 2021-07-29 17:49:37 +02:00
parent c9a46ab0cc
commit 12b2ba64eb

View File

@ -449,7 +449,7 @@ if (empty($reshook)) {
}
// Set parent company
if ($action == 'set_thirdparty' && $user->rights->societe->creer) {
if ($action == 'set_thirdparty' && $user->rights->ticket->write) {
if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
$result = $object->setCustomer(GETPOST('editcustomer', 'int'));
$url = 'card.php?action=view&track_id=' . GETPOST('track_id', 'alpha');