So in terms of permissions ROLE_USER < ROLE_USER_X < ROLE_ADMIN.
Somewhere in security.yml I write this
- Code: Select all
What I wanted to get from the hierarchy is $user->hasRole('ROLE_USER_X') to be true for admins. But it seems hasRole()/getRoles() only uses data from the entity, it completely ignores the hierarchy.
So what is the point of role_hierarchy and where it is used?