MCPcopy Index your code
hub / github.com/apache/casbin / GetUsersForRole

Method GetUsersForRole

rbac_api_synced.go:25–29  ·  view source on GitHub ↗

GetUsersForRole gets the users that has a role.

(name string, domain ...string)

Source from the content-addressed store, hash-verified

23
24// GetUsersForRole gets the users that has a role.
25func (e *SyncedEnforcer) GetUsersForRole(name string, domain ...string) ([]string, error) {
26 e.m.RLock()
27 defer e.m.RUnlock()
28 return e.Enforcer.GetUsersForRole(name, domain...)
29}
30
31// HasRoleForUser determines whether a user has a role.
32func (e *SyncedEnforcer) HasRoleForUser(name string, role string, domain ...string) (bool, error) {

Callers

nothing calls this directly

Calls 1

GetUsersForRoleMethod · 0.65

Tested by

no test coverage detected