Fix regression in permission test for list of holiday

This commit is contained in:
Laurent Destailleur 2024-04-29 13:31:41 +02:00
parent 3df149045d
commit ff54b1cb5a

View file

@ -43,7 +43,7 @@ if ($user->socid > 0) { // Protection if external user
//$socid = $user->socid;
accessforbidden();
}
$result = restrictedArea($user, 'holiday', $id, '', 'readall');
$result = restrictedArea($user, 'holiday', $id);
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view';
$massaction = GETPOST('massaction', 'alpha');
@ -76,6 +76,11 @@ $hookmanager->initHooks(array('leavemovementlist'));
$arrayfields = array();
$arrayofmassactions = array();
if (!$user->hasRight('holiday', 'readall')) {
accessforbidden();
}
/*
* Actions
*/