Enforce decides whether a "subject" can access a "object" with the operation "action", input parameters are usually: (sub, obj, act).
(rvals ...interface{})
| 189 | |
| 190 | // Enforce decides whether a "subject" can access a "object" with the operation "action", input parameters are usually: (sub, obj, act). |
| 191 | func (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 "". |
| 198 | func (e *SyncedEnforcer) EnforceWithMatcher(matcher string, rvals ...interface{}) (bool, error) { |