diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 11d3c70c4a8..3de5c2a5e19 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -148,11 +148,11 @@ if (empty($reshook)) $description = trim(GETPOST('description', 'restricthtml')); // Check that leave is for a user inside the hierarchy or advanced permission for all is set - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->writeall_advance))) { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->create)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->writeall_advance))) { $error++; setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); } else { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) { if (!in_array($fuserid, $childids)) { $error++; setEventMessages($langs->trans("UserNotInHierachy"), null, 'errors');