GetImplicitPermissionsForUser gets implicit permissions for a user or role. Compared to GetPermissionsForUser(), this function retrieves permissions for inherited roles. For example: p, admin, data1, read p, alice, data2, read g, alice, admin GetPermissionsForUser("alice") can only get: [["alice",
(user string, domain ...string)
| 168 | // GetPermissionsForUser("alice") can only get: [["alice", "data2", "read"]]. |
| 169 | // But GetImplicitPermissionsForUser("alice") will get: [["admin", "data1", "read"], ["alice", "data2", "read"]]. |
| 170 | func (e *SyncedEnforcer) GetImplicitPermissionsForUser(user string, domain ...string) ([][]string, error) { |
| 171 | e.m.Lock() |
| 172 | defer e.m.Unlock() |
| 173 | return e.Enforcer.GetImplicitPermissionsForUser(user, domain...) |
| 174 | } |
| 175 | |
| 176 | // GetNamedImplicitPermissionsForUser gets implicit permissions for a user or role by named policy. |
| 177 | // Compared to GetNamedPermissionsForUser(), this function retrieves permissions for inherited roles. |
nothing calls this directly
no test coverage detected