Browse Source

Fix regression in permission test

Laurent Destailleur 1 year ago
parent
commit
a4535dec61
1 changed files with 4 additions and 2 deletions
  1. 4 2
      htdocs/holiday/month_report.php

+ 4 - 2
htdocs/holiday/month_report.php

@@ -73,8 +73,10 @@ if ($user->socid > 0) {	// Protection if external user
 	//$socid = $user->socid;
 	accessforbidden();
 }
-$result = restrictedArea($user, 'holiday', $id, '', 'readall');
-
+$result = restrictedArea($user, 'holiday', $id, '', '');
+if (!$user->hasRight('holiday', 'readall')) {
+	accessforbidden();
+}
 
 /*
  * Actions