GetPolicy gets all the authorization rules in the policy.
()
| 95 | |
| 96 | // GetPolicy gets all the authorization rules in the policy. |
| 97 | func (e *Enforcer) GetPolicy() ([][]string, error) { |
| 98 | return e.GetNamedPolicy("p") |
| 99 | } |
| 100 | |
| 101 | // GetFilteredPolicy gets all the authorization rules in the policy, field filters can be specified. |
| 102 | func (e *Enforcer) GetFilteredPolicy(fieldIndex int, fieldValues ...string) ([][]string, error) { |