MCPcopy Index your code
hub / github.com/apache/casbin / GetPolicy

Method GetPolicy

enforcer_synced.go:296–300  ·  view source on GitHub ↗

GetPolicy gets all the authorization rules in the policy.

()

Source from the content-addressed store, hash-verified

294
295// GetPolicy gets all the authorization rules in the policy.
296func (e *SyncedEnforcer) GetPolicy() ([][]string, error) {
297 e.m.RLock()
298 defer e.m.RUnlock()
299 return e.Enforcer.GetPolicy()
300}
301
302// GetFilteredPolicy gets all the authorization rules in the policy, field filters can be specified.
303func (e *SyncedEnforcer) GetFilteredPolicy(fieldIndex int, fieldValues ...string) ([][]string, error) {

Callers

nothing calls this directly

Calls 1

GetPolicyMethod · 0.65

Tested by

no test coverage detected