HasPermissionForUser determines whether a user has a permission.
(user string, permission ...string)
| 139 | |
| 140 | // HasPermissionForUser determines whether a user has a permission. |
| 141 | func (e *SyncedEnforcer) HasPermissionForUser(user string, permission ...string) (bool, error) { |
| 142 | e.m.RLock() |
| 143 | defer e.m.RUnlock() |
| 144 | return e.Enforcer.HasPermissionForUser(user, permission...) |
| 145 | } |
| 146 | |
| 147 | // GetImplicitRolesForUser gets implicit roles that a user has. |
| 148 | // Compared to GetRolesForUser(), this function retrieves indirect roles besides direct roles. |
nothing calls this directly
no test coverage detected