Skip to content

Commit

Permalink
Tidy up permissions and descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewandante committed Oct 26, 2023
1 parent 997cbe6 commit 4cb03f3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Dev/DevelopmentAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,16 @@ 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'])
);
}

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
],
Expand Down

0 comments on commit 4cb03f3

Please sign in to comment.