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

Method EnforceWithMatcher

enforcer.go:932–934  ·  view source on GitHub ↗

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 "".

(matcher string, rvals ...interface{})

Source from the content-addressed store, hash-verified

930
931// 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 "".
932func (e *Enforcer) EnforceWithMatcher(matcher string, rvals ...interface{}) (bool, error) {
933 return e.enforce(matcher, nil, rvals...)
934}
935
936// EnforceEx explain enforcement by informing matched rules.
937func (e *Enforcer) EnforceEx(rvals ...interface{}) (bool, []string, error) {

Callers

nothing calls this directly

Calls 1

enforceMethod · 0.95

Tested by

no test coverage detected