user->checkAccess is false when auth is parent

On an app i switched to db auth management to use a more complex auth system, but now i can’t understand why an user with a parent role fails the check for the child role.


this fails for a Superadmin user

I’ll explain myself:

I have 3 Roles: Normal, Administrator, Superadmin

The superadmin has 2 childs, Normal and Administrator, while administrator has 1, Normal.

Obviously every parent must be able to do everything his child can do.

Here’s the code from Useridentity where i assign the role



            $this->setState('title', $myUser->access_level);