UpdatePolicy updates an authorization rule from the current policy.
(oldPolicy []string, newPolicy []string)
| 425 | |
| 426 | // UpdatePolicy updates an authorization rule from the current policy. |
| 427 | func (e *SyncedEnforcer) UpdatePolicy(oldPolicy []string, newPolicy []string) (bool, error) { |
| 428 | e.m.Lock() |
| 429 | defer e.m.Unlock() |
| 430 | return e.Enforcer.UpdatePolicy(oldPolicy, newPolicy) |
| 431 | } |
| 432 | |
| 433 | func (e *SyncedEnforcer) UpdateNamedPolicy(ptype string, p1 []string, p2 []string) (bool, error) { |
| 434 | e.m.Lock() |
nothing calls this directly
no test coverage detected