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

Method RemovePolicy

management_api.go:285–287  ·  view source on GitHub ↗

RemovePolicy removes an authorization rule from the current policy.

(params ...interface{})

Source from the content-addressed store, hash-verified

283
284// RemovePolicy removes an authorization rule from the current policy.
285func (e *Enforcer) RemovePolicy(params ...interface{}) (bool, error) {
286 return e.RemoveNamedPolicy("p", params...)
287}
288
289// UpdatePolicy updates an authorization rule from the current policy.
290func (e *Enforcer) UpdatePolicy(oldPolicy []string, newPolicy []string) (bool, error) {

Callers 12

TestSetWatcherExFunction · 0.95
TestSetEventTypesFunction · 0.95
TestEnableAutoSaveFunction · 0.95
TestModifyPolicyAPIFunction · 0.95
TestMockAdapterErrorsFunction · 0.95

Calls 1

RemoveNamedPolicyMethod · 0.95

Tested by 11

TestSetWatcherExFunction · 0.76
TestSetEventTypesFunction · 0.76
TestEnableAutoSaveFunction · 0.76
TestModifyPolicyAPIFunction · 0.76
TestMockAdapterErrorsFunction · 0.76