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

Method GetAllNamedObjects

management_api.go:47–53  ·  view source on GitHub ↗

GetAllNamedObjects gets the list of objects that show up in the current named policy.

(ptype string)

Source from the content-addressed store, hash-verified

45
46// GetAllNamedObjects gets the list of objects that show up in the current named policy.
47func (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.
56func (e *Enforcer) GetAllActions() ([]string, error) {

Callers

nothing calls this directly

Calls 2

GetFieldIndexMethod · 0.45

Tested by

no test coverage detected