GetImplicitRolesForUser gets implicit roles that a user has. Compared to GetRolesForUser(), this function retrieves indirect roles besides direct roles. For example: g, alice, role:admin g, role:admin, role:user GetRolesForUser("alice") can only get: ["role:admin"]. But GetImplicitRolesForUser("ali
(name string, domain ...string)
| 153 | // GetRolesForUser("alice") can only get: ["role:admin"]. |
| 154 | // But GetImplicitRolesForUser("alice") will get: ["role:admin", "role:user"]. |
| 155 | func (e *SyncedEnforcer) GetImplicitRolesForUser(name string, domain ...string) ([]string, error) { |
| 156 | e.m.RLock() |
| 157 | defer e.m.RUnlock() |
| 158 | return e.Enforcer.GetImplicitRolesForUser(name, domain...) |
| 159 | } |
| 160 | |
| 161 | // GetImplicitPermissionsForUser gets implicit permissions for a user or role. |
| 162 | // Compared to GetPermissionsForUser(), this function retrieves permissions for inherited roles. |
nothing calls this directly
no test coverage detected