MCPcopy
hub / github.com/apache/casbin / DeleteRoleForUserInDomain

Method DeleteRoleForUserInDomain

rbac_api_with_domains.go:55–57  ·  view source on GitHub ↗

DeleteRoleForUserInDomain deletes a role for a user inside a domain. Returns false if the user does not have the role (aka not affected).

(user string, role string, domain string)

Source from the content-addressed store, hash-verified

53// DeleteRoleForUserInDomain deletes a role for a user inside a domain.
54// Returns false if the user does not have the role (aka not affected).
55func (e *Enforcer) DeleteRoleForUserInDomain(user string, role string, domain string) (bool, error) {
56 return e.RemoveGroupingPolicy(user, role, domain)
57}
58
59// DeleteRolesForUserInDomain deletes all roles for a user inside a domain.
60// Returns false if the user does not have any roles (aka not affected).

Callers 2

TestUserAPIWithDomainsFunction · 0.95
TestRoleAPIWithDomainsFunction · 0.95

Calls 1

RemoveGroupingPolicyMethod · 0.95

Tested by 2

TestUserAPIWithDomainsFunction · 0.76
TestRoleAPIWithDomainsFunction · 0.76