Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Permission wildcards not working #37

Open
Axwabo opened this issue Mar 2, 2025 · 0 comments
Open

[BUG] Permission wildcards not working #37

Axwabo opened this issue Mar 2, 2025 · 0 comments
Assignees

Comments

@Axwabo
Copy link

Axwabo commented Mar 2, 2025

The wildcard checks in DefaultPermissionsProvider are essentially inverted.
Because of this line, the permissions superset will contain the sub-permissions as a wildcard. This is not optimal as plugins aren't checking for group.*, rather group.permission
Configured wildcards should support any level of nesting; possible iterations should be processed in the HasPermission method.

The change would make the SpecialPermissionsSuperset redundant. This set could be reused to cache all permissions including inherited groups, reducing the complexity and improving the efficiency of the HasPermission method (as there wouldn't be dictionary lookups nor recursion).

@Jesus-QC Jesus-QC self-assigned this Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants