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

Method IsFiltered

enforcer.go:518–524  ·  view source on GitHub ↗

IsFiltered returns true if the loaded policy has been filtered.

()

Source from the content-addressed store, hash-verified

516
517// IsFiltered returns true if the loaded policy has been filtered.
518func (e *Enforcer) IsFiltered() bool {
519 filteredAdapter, ok := e.adapter.(persist.FilteredAdapter)
520 if !ok {
521 return false
522 }
523 return filteredAdapter.IsFiltered()
524}
525
526// SavePolicy saves the current policy (usually after changed with Casbin API) back to file/database.
527func (e *Enforcer) SavePolicy() error {

Callers 5

TestLoadFilteredPolicyFunction · 0.95
TestAppendFilteredPolicyFunction · 0.95
SavePolicyMethod · 0.95

Calls 1

IsFilteredMethod · 0.65

Tested by 4

TestLoadFilteredPolicyFunction · 0.76
TestAppendFilteredPolicyFunction · 0.76