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:
- Role A is role B's parent, B is A's child
- add role with role name (string)
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
return [
// ...
'mezzio-authorization-rbac' => [
'roles' => [
'__member__' => ['SystemAdministrator'],
'__guest__' => ['__member__'],
'SystemAdministrator' => [],
],
'permissions' => [
'__guest__' => [
'home',
'account.login',
'account.logout',
],
'__member__' => [
'account.profile',
],
],
]
];
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.
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.