]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Fix storing ACL config actions for very old PHP versions
authorMarcin Haba <marcin.haba@bacula.pl>
Thu, 15 Jun 2023 08:43:17 +0000 (10:43 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Mon, 3 Jul 2023 08:46:57 +0000 (10:46 +0200)
gui/baculum/protected/API/Modules/BaculaConfigACL.php

index f5144b3279a8e5aecf6c27b17c0d09fa53741b7f..9180ed41e1d315e060f116fdf8b661070ebad8fa 100644 (file)
@@ -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);
        }
 
        /**