Enforce decides whether a "subject" can access a "object" with the operation "action", input parameters are usually: (sub, obj, act).
(rvals ...interface{})
| 925 | |
| 926 | // Enforce decides whether a "subject" can access a "object" with the operation "action", input parameters are usually: (sub, obj, act). |
| 927 | func (e *Enforcer) Enforce(rvals ...interface{}) (bool, error) { |
| 928 | return e.enforce("", nil, rvals...) |
| 929 | } |
| 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) { |