Merge pull request #20147 from Hystepik/develop_safe_v14
Fix : fix error of permission in holiday
This commit is contained in:
commit
971c0fc764
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user