From 82b29e6abcb3dd9b4d73e3bcfba73afd13878ec1 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 9 Jan 2023 19:53:41 +0100 Subject: [PATCH] LSsession::canExecuteCustomAction(): fix handling self LSprofile --- src/includes/class/class.LSsession.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/includes/class/class.LSsession.php b/src/includes/class/class.LSsession.php index df606f37..f5fe0bc1 100644 --- a/src/includes/class/class.LSsession.php +++ b/src/includes/class/class.LSsession.php @@ -2680,8 +2680,10 @@ class LSsession { $whoami = self :: whoami($dn); if (isset($conf['rights']) && is_array($conf['rights'])) { + if ($dn == self :: $dn && in_array('self', $conf['rights'])) + return True; foreach($whoami as $who) { - if (in_array($who,$conf['rights'])) { + if ($who != 'self' && in_array($who,$conf['rights'])) { return True; } }