From: Marcin Haba Date: Thu, 15 Jun 2023 08:43:17 +0000 (+0200) Subject: baculum: Fix storing ACL config actions for very old PHP versions X-Git-Tag: Release-13.0.4~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=854aa75a8f762dddd2a2ee39651ebe6fc85a0754;p=thirdparty%2Fbacula.git baculum: Fix storing ACL config actions for very old PHP versions --- diff --git a/gui/baculum/protected/API/Modules/BaculaConfigACL.php b/gui/baculum/protected/API/Modules/BaculaConfigACL.php index f5144b327..9180ed41e 100644 --- a/gui/baculum/protected/API/Modules/BaculaConfigACL.php +++ b/gui/baculum/protected/API/Modules/BaculaConfigACL.php @@ -34,7 +34,7 @@ class BaculaConfigACL extends APIModule /** * Special config ACL action names. */ - const CONFIG_ACL_ACTIONS = [ + private static $config_acl_actions = [ 'READ', 'CREATE', 'UPDATE', @@ -44,7 +44,7 @@ class BaculaConfigACL extends APIModule * Validate if request command is allowed. * * @param string $console_name Director Console name - * @param string $action current action (@see BaculaConfigACL::CONFIG_ACL_ACTIONS) + * @param string $action current action (@see BaculaConfigACL::$config_acl_actions) * @param string $component_type component type (currently not used) * @param string $resource_type resource type * @return bool true if request command is allowed, false otherwise @@ -73,7 +73,7 @@ class BaculaConfigACL extends APIModule */ private function validateAction($action) { - return in_array($action, self::CONFIG_ACL_ACTIONS); + return in_array($action, self::$config_acl_actions); } /**