From ff54b1cb5a4b0f7d66c19755c9150ba6058888b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 29 Apr 2024 13:31:41 +0200 Subject: [PATCH] Fix regression in permission test for list of holiday --- htdocs/holiday/month_report.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index 070220495d6..0968d4c9b9d 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -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 */