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

Method GetUsersForRoleInDomain

rbac_api_with_domains.go:24–30  ·  view source on GitHub ↗

GetUsersForRoleInDomain gets the users that has a role inside a domain. Add by Gordon.

(name string, domain string)

Source from the content-addressed store, hash-verified

22
23// GetUsersForRoleInDomain gets the users that has a role inside a domain. Add by Gordon.
24func (e *Enforcer) GetUsersForRoleInDomain(name string, domain string) []string {
25 if e.GetRoleManager() == nil {
26 return nil
27 }
28 res, _ := e.GetRoleManager().GetUsers(name, domain)
29 return res
30}
31
32// GetRolesForUserInDomain gets the roles that a user has inside a domain.
33func (e *Enforcer) GetRolesForUserInDomain(name string, domain string) []string {

Callers

nothing calls this directly

Calls 2

GetRoleManagerMethod · 0.95
GetUsersMethod · 0.65

Tested by

no test coverage detected