Skip to content

Conversation

@kenjis
Copy link
Member

@kenjis kenjis commented Jan 19, 2023

See #600 (comment)

$filters cannot set filer aruguments.
@kenjis kenjis added the documentation Improvements or additions to documentation label Jan 19, 2023
$routes->resource('users');
$routes->group(
'',
['filter' => ['group:admin,superadmin', 'permission:users.manage']],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
['filter' => ['group:admin,superadmin', 'permission:users.manage']],
['filter' => ['group:admin,superadmin', 'permission:users.manage-admins']],

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

permission:users.manage is not listed in https://github.com/codeigniter4/shield/blob/develop/docs/authorization.md#defining-available-permissions
But in this case, I feel permission:users.manage-admins is a bit weird.
The URI seems the page to manage users, not admin-users.

Copy link
Collaborator

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kenjis and sorry for the delay.

@kenjis kenjis merged commit 697f570 into codeigniter4:develop Jan 20, 2023
@kenjis kenjis deleted the fix-docs-flters branch January 20, 2023 08:46
@kenjis
Copy link
Member Author

kenjis commented Jan 20, 2023

@datamweb No problem. Thank you for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants