GetAllNamedObjects gets the list of objects that show up in the current named policy.
(ptype string)
| 45 | |
| 46 | // GetAllNamedObjects gets the list of objects that show up in the current named policy. |
| 47 | func (e *Enforcer) GetAllNamedObjects(ptype string) ([]string, error) { |
| 48 | fieldIndex, err := e.model.GetFieldIndex(ptype, constant.ObjectIndex) |
| 49 | if err != nil { |
| 50 | return nil, err |
| 51 | } |
| 52 | return e.model.GetValuesForFieldInPolicy("p", ptype, fieldIndex) |
| 53 | } |
| 54 | |
| 55 | // GetAllActions gets the list of actions that show up in the current policy. |
| 56 | func (e *Enforcer) GetAllActions() ([]string, error) { |
nothing calls this directly
no test coverage detected