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

Method GetPermissionsForUser

rbac_api_synced.go:127–131  ·  view source on GitHub ↗

GetPermissionsForUser gets permissions for a user or role.

(user string, domain ...string)

Source from the content-addressed store, hash-verified

125
126// GetPermissionsForUser gets permissions for a user or role.
127func (e *SyncedEnforcer) GetPermissionsForUser(user string, domain ...string) ([][]string, error) {
128 e.m.RLock()
129 defer e.m.RUnlock()
130 return e.Enforcer.GetPermissionsForUser(user, domain...)
131}
132
133// GetNamedPermissionsForUser gets permissions for a user or role by named policy.
134func (e *SyncedEnforcer) GetNamedPermissionsForUser(ptype string, user string, domain ...string) ([][]string, error) {

Callers

nothing calls this directly

Calls 1

GetPermissionsForUserMethod · 0.65

Tested by

no test coverage detected