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

Method HasPermissionForUser

rbac_api.go:221–223  ·  view source on GitHub ↗

HasPermissionForUser determines whether a user has a permission.

(user string, permission ...string)

Source from the content-addressed store, hash-verified

219
220// HasPermissionForUser determines whether a user has a permission.
221func (e *Enforcer) HasPermissionForUser(user string, permission ...string) (bool, error) {
222 return e.HasPolicy(util.JoinSlice(user, permission...))
223}
224
225// GetImplicitRolesForUser gets implicit roles that a user has.
226// Compared to GetRolesForUser(), this function retrieves indirect roles besides direct roles.

Callers

nothing calls this directly

Calls 2

HasPolicyMethod · 0.95
JoinSliceFunction · 0.92

Tested by

no test coverage detected