You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
In v3.x, if you create a role, add a child role too it, then add the parent role to the Rbac instance, the child role is not added. Using your own example code:
use Zend\Permissions\Rbac\Rbac;
use Zend\Permissions\Rbac\Role;
$rbac = new Rbac();
$foo = new Role('foo');
$bar = new Role('bar');
$foo->addChild($bar);
$rbac->addRole($foo);
echo $rbac->hasRole("bar") ? "works" : "doesn't work";
This displays "doesn't work". Similarly, attempting a permission check against role "bar" raises a "No role with name 'bar' could be found" exception.