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

Method GetRoleManager

enforcer.go:257–265  ·  view source on GitHub ↗

GetRoleManager gets the current role manager.

()

Source from the content-addressed store, hash-verified

255
256// GetRoleManager gets the current role manager.
257func (e *Enforcer) GetRoleManager() rbac.RoleManager {
258 if e.rmMap != nil && e.rmMap["g"] != nil {
259 return e.rmMap["g"]
260 } else if e.condRmMap != nil && e.condRmMap["g"] != nil {
261 return e.condRmMap["g"]
262 } else {
263 return nil
264 }
265}
266
267// GetNamedRoleManager gets the role manager for the named policy.
268func (e *Enforcer) GetNamedRoleManager(ptype string) rbac.RoleManager {

Callers 15

DeleteDomainsMethod · 0.95
GetAllDomainsMethod · 0.95
TestImplicitRoleAPIFunction · 0.95
GetRolesForUserMethod · 0.95
GetUsersForRoleMethod · 0.95

Calls

no outgoing calls