From f2b39b3eeb82e6e182d6f3ad9a39573f1076c253 Mon Sep 17 00:00:00 2001 From: ksar <35605507+ksar-ksar@users.noreply.github.com> Date: Tue, 21 Sep 2021 11:27:41 +0200 Subject: [PATCH] FIX #18767 : Adherent delete Adherent Delete was not working due to the fact that $features = 'adherent'; $feature2 = 'cotisation'; And $user->rights->$feature->$subfeature->supprimer does not exist Also I used the double declaration of salaries. --- htdocs/core/lib/security.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 4c36244a5bf..da5d9388bd8 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -513,8 +513,8 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f if (!$user->rights->salaries->delete) { $deleteok = 0; } - } elseif ($feature == 'salaries') { - if (!$user->rights->salaries->delete) { + } elseif ($feature == 'adherent') { + if (!$user->rights->adherent->supprimer) { $deleteok = 0; } } elseif (!empty($feature2)) { // This is for permissions on 2 levels