user-management icon indicating copy to clipboard operation
user-management copied to clipboard

hasRole() function doesnt work with children roles

Open zahiaracks opened this issue 4 years ago • 0 comments

Lets say we have two roles: department-boss role and director role, whose child is the department-boss role. In that scenario, ill expect the function hasRole('department-boss') returns true when im logged in like a user that has director role, but its returns false. I saw that in the session __userRoles only shows [0 => 'director'] too.

Is there any other way to query for child roles or is it just a bug?

zahiaracks avatar Sep 22 '20 14:09 zahiaracks