diff options
Diffstat (limited to 'ui/include/classes/api/services/CSettings.php')
-rw-r--r-- | ui/include/classes/api/services/CSettings.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/include/classes/api/services/CSettings.php b/ui/include/classes/api/services/CSettings.php index de3a4dd6f68..b3a58413ffb 100644 --- a/ui/include/classes/api/services/CSettings.php +++ b/ui/include/classes/api/services/CSettings.php @@ -130,6 +130,12 @@ class CSettings extends CApiService { * @return array */ public function update(array $settings): array { + if (self::$userData['type'] != USER_TYPE_SUPER_ADMIN) { + self::exception(ZBX_API_ERROR_PERMISSIONS, + _s('No permissions to call "%1$s.%2$s".', 'settings', __FUNCTION__) + ); + } + $db_settings = $this->validateUpdate($settings); $upd_config = DB::getUpdatedValues('config', $settings, $db_settings); |