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

Method Enforce

enforcer_synced.go:191–195  ·  view source on GitHub ↗

Enforce decides whether a "subject" can access a "object" with the operation "action", input parameters are usually: (sub, obj, act).

(rvals ...interface{})

Source from the content-addressed store, hash-verified

189
190// Enforce decides whether a "subject" can access a "object" with the operation "action", input parameters are usually: (sub, obj, act).
191func (e *SyncedEnforcer) Enforce(rvals ...interface{}) (bool, error) {
192 e.m.RLock()
193 defer e.m.RUnlock()
194 return e.Enforcer.Enforce(rvals...)
195}
196
197// EnforceWithMatcher use a custom matcher to decides whether a "subject" can access a "object" with the operation "action", input parameters are usually: (matcher, sub, obj, act), use model matcher by default when matcher is "".
198func (e *SyncedEnforcer) EnforceWithMatcher(matcher string, rvals ...interface{}) (bool, error) {

Callers

nothing calls this directly

Calls 1

EnforceMethod · 0.65

Tested by

no test coverage detected