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{})
| 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 "". |
| 932 | func (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. |
| 937 | func (e *Enforcer) EnforceEx(rvals ...interface{}) (bool, []string, error) { |