Fix : fix error of permission in holiday

This commit is contained in:
lmarcouiller 2022-02-22 17:06:10 +01:00
parent e948db69f2
commit 65ecd2f3ef

View File

@ -113,7 +113,7 @@ if ($object->statut == Holiday::STATUS_DRAFT && $user->rights->holiday->write &&
if ($user->socid) {
$socid = $user->socid;
}
$result = restrictedArea($user, 'holiday', $object->id, 'holiday');
$result = restrictedArea($user, 'holiday', $object->id, 'holiday','','','rowid',$object->statut);
/*
@ -1400,7 +1400,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
// Confirmation messages
if ($action == 'delete') {
if ($user->rights->holiday->delete) {
if ($candelete) {
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleDeleteCP"), $langs->trans("ConfirmDeleteCP"), "confirm_delete", '', 0, 1);
}
}