I am trying to create nested roles, where the developer is the role that can have access to all the controller/action, here is my genealogy layout:
'role_providers' => array(
'BjyAuthorize\Provider\Role\Config' => array(
'guest' => array('children' => array(
'programador' => array(
'children'=>array(
'administration'=>array('children'=>array('developer'=>array())),
)
),
'conclidiador' => array(
'children'=>array(
'administration'=>array('children'=>array('developer'=>array())),
)
),
'tesorero' => array(
'children'=>array(
'administration'=>array('children'=>array('developer'=>array())),
)
),
)),
),
),
This does not work.
It works fine if I just leave one.
'role_providers' => array(
'BjyAuthorize\Provider\Role\Config' => array(
'guest' => array('children' => array(
'programador' => array(
'children'=>array(
'administration'=>array('children'=>array('developer'=>array())),
)
),
)),
),
),
I will like developer to have access to everything then administration and then the rest programador,conclidiador, tesorero on the same level and at the end guest.
I'm trying to a similar thing but have a different style in by config file:
I've also had to adjust the table 'user_role' to correspond to the above layout/config have the correct 'user_role'.'parent_id' values as above
Therefore, I'd assume you would need something like this:
That was the parent 'user' has the same level as all. Then define the permissions to that level in your route/controller gaurds. 'user' is the base access to all sub roles, then the split is in 'administrator'