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

Method SavePolicy

enforcer_synced.go:177–181  ·  view source on GitHub ↗

SavePolicy saves the current policy (usually after changed with Casbin API) back to file/database.

()

Source from the content-addressed store, hash-verified

175
176// SavePolicy saves the current policy (usually after changed with Casbin API) back to file/database.
177func (e *SyncedEnforcer) SavePolicy() error {
178 e.m.Lock()
179 defer e.m.Unlock()
180 return e.Enforcer.SavePolicy()
181}
182
183// BuildRoleLinks manually rebuild the role inheritance relations.
184func (e *SyncedEnforcer) BuildRoleLinks() error {

Callers

nothing calls this directly

Calls 1

SavePolicyMethod · 0.65

Tested by

no test coverage detected