-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
RBAC addRole: The role missing children, if the roles are added in wrong order #23
Comments
@kenchou Please report this problem in the issue tracker of mezzio-authorization-rbac. Thanks! |
mezzio configuration file merge order is OK. global first, local (for dev) overwrite or append it. The root cause of the problem is addRole from string.
should first try to get an existing instance
|
@kenchou |
Signed-off-by: Ken Chou <[email protected]>
I create a unit test and open a PR: thx. |
Signed-off-by: Ken Chou <[email protected]>
Bug Report
Summary
The role permissions are wrong, if the roles are added in a different order
I use the package mezzio/mezzio-authorization-rbac.
some basic role in global.php, and add some debug role in local.php.
After merging, The local configuration is always after the global configuration
P:
if add A before B, role A has child B, It's OK.
But if add A after B, role A hash no children!
Current behavior
How to reproduce
if the role 'SystemAdministrator' is after member, it has no children.
if the role 'SystemAdministrator' is before member, the result is OK.
Expected behavior
SystemAdministrator has child member, ignore the order of addition.
The text was updated successfully, but these errors were encountered: