From 4cb03f31a5c505f77e6bc8795518f5870ce575c8 Mon Sep 17 00:00:00 2001 From: Andrew Paxley Date: Thu, 26 Oct 2023 16:54:12 +1300 Subject: [PATCH] Tidy up permissions and descriptions --- src/Dev/DevelopmentAdmin.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Dev/DevelopmentAdmin.php b/src/Dev/DevelopmentAdmin.php index dbe5eb57..945716e7 100644 --- a/src/Dev/DevelopmentAdmin.php +++ b/src/Dev/DevelopmentAdmin.php @@ -104,9 +104,7 @@ public function canInit(): bool // We need to ensure that DevelopmentAdminTest can simulate permission failures when running // "dev/tasks" from CLI. || (Director::is_cli() && RootDevelopmentAdmin::config()->get('allow_all_cli')) - || Permission::check("ADMIN") - || Permission::check("ALL_DEV_ADMIN") - || Permission::check("CAN_DEV_GRAPHQL") + || Permission::check(['ADMIN', 'ALL_DEV_ADMIN', 'CAN_DEV_GRAPHQL']) ); } @@ -114,8 +112,8 @@ public function providePermissions(): array { return [ 'CAN_DEV_GRAPHQL' => [ - 'name' => _t(__CLASS__ . '.CAN_DEV_GRAPHQL_DESCRIPTION', 'Can access GraphQL tools'), - 'help' => _t(__CLASS__ . '.CAN_DEV_GRAPHQL_HELP', 'Can access GraphQL tools (/dev/graphql).'), + 'name' => _t(__CLASS__ . '.CAN_DEV_GRAPHQL_DESCRIPTION', 'Can view and execute /dev/graphql'), + 'help' => _t(__CLASS__ . '.CAN_DEV_GRAPHQL_HELP', 'Can view and execute GraphQL development tools (/dev/graphql).'), 'category' => RootDevelopmentAdmin::permissionsCategory(), 'sort' => 100 ],