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

Method UpdatePolicy

enforcer_synced.go:427–431  ·  view source on GitHub ↗

UpdatePolicy updates an authorization rule from the current policy.

(oldPolicy []string, newPolicy []string)

Source from the content-addressed store, hash-verified

425
426// UpdatePolicy updates an authorization rule from the current policy.
427func (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
433func (e *SyncedEnforcer) UpdateNamedPolicy(ptype string, p1 []string, p2 []string) (bool, error) {
434 e.m.Lock()

Callers

nothing calls this directly

Calls 1

UpdatePolicyMethod · 0.65

Tested by

no test coverage detected