GetPolicy gets all the authorization rules in the policy.
()
| 294 | |
| 295 | // GetPolicy gets all the authorization rules in the policy. |
| 296 | func (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. |
| 303 | func (e *SyncedEnforcer) GetFilteredPolicy(fieldIndex int, fieldValues ...string) ([][]string, error) { |