From 73dc92e0ab4c8e173e7dff9288329cb7355c123a Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 15 May 2023 22:27:31 +0900 Subject: [PATCH 1/2] docs: add property types --- docs/authorization.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/authorization.md b/docs/authorization.md index 16ac5a797..d2aa2875c 100644 --- a/docs/authorization.md +++ b/docs/authorization.md @@ -38,7 +38,7 @@ Groups are defined within the `Shield\Config\AuthGroups` config class. ```php -public $groups = [ +public array $groups = [ 'superadmin' => [ 'title' => 'Super Admin', 'description' => 'Optional description of the group.', @@ -66,7 +66,7 @@ a scope and action, like `users.create`. The scope would be `users` and the acti can have a description for display within UIs if needed. ```php -public $permissions = [ +public array $permissions = [ 'admin.access' => 'Can access the sites admin area', 'admin.settings' => 'Can access the main site settings', 'users.manage-admins' => 'Can manage other admins', @@ -88,7 +88,7 @@ The matrix is an associative array with the group name as the key, and an array of permissions that should be applied to that group. ```php -public $matrix = [ +public array $matrix = [ 'admin' => [ 'admin.access', 'users.create', 'users.edit', 'users.delete', @@ -100,7 +100,7 @@ public $matrix = [ You can use a wildcard within a scope to allow all actions within that scope, by using a `*` in place of the action. ```php -public $matrix = [ +public array $matrix = [ 'superadmin' => ['admin.*', 'users.*', 'beta.*'], ]; ``` From 35c736283f4b11aaa489f8c46ea0e34eba6eadcf Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 15 May 2023 22:27:49 +0900 Subject: [PATCH 2/2] docs: fix incorrect property value --- docs/authorization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/authorization.md b/docs/authorization.md index d2aa2875c..ee3aa104c 100644 --- a/docs/authorization.md +++ b/docs/authorization.md @@ -56,7 +56,7 @@ When a user is first registered on the site, they are assigned to a default user `Config\AuthGroups::$defaultGroup`, and must match the name of one of the defined groups. ```php -public $defaultGroup = 'users'; +public string $defaultGroup = 'user'; ``` ## Defining Available Permissions