diff --git a/web/api/app/Controller/ConfigsController.php b/web/api/app/Controller/ConfigsController.php index 8ef062fae..b6a10c7ea 100644 --- a/web/api/app/Controller/ConfigsController.php +++ b/web/api/app/Controller/ConfigsController.php @@ -105,7 +105,7 @@ class ConfigsController extends AppController { */ public function edit($id = null) { global $user; - $canEdit = (!$user) || ($user['System'] == 'Edit'); + $canEdit = (!$user) || ($user->System() == 'Edit'); if (!$canEdit) { throw new UnauthorizedException(__('Insufficient privileges')); return; @@ -143,7 +143,7 @@ class ConfigsController extends AppController { */ public function delete($id = null) { global $user; - $canEdit = (!$user) || ($user['System'] == 'Edit'); + $canEdit = (!$user) || ($user->System() == 'Edit'); if (!$canEdit) { throw new UnauthorizedException(__('Insufficient privileges')); return;