MCPcopy
hub / github.com/apache/casbin / BatchEnforceWithMatcher

Method BatchEnforceWithMatcher

enforcer.go:964–974  ·  view source on GitHub ↗

BatchEnforceWithMatcher enforce with matcher in batches.

(matcher string, requests [][]interface{})

Source from the content-addressed store, hash-verified

962
963// BatchEnforceWithMatcher enforce with matcher in batches.
964func (e *Enforcer) BatchEnforceWithMatcher(matcher string, requests [][]interface{}) ([]bool, error) {
965 var results []bool
966 for _, request := range requests {
967 result, err := e.enforce(matcher, nil, request...)
968 if err != nil {
969 return results, err
970 }
971 results = append(results, result)
972 }
973 return results, nil
974}
975
976// AddNamedMatchingFunc add MatchingFunc by ptype RoleManager.
977func (e *Enforcer) AddNamedMatchingFunc(ptype, name string, fn rbac.MatchingFunc) bool {

Callers

nothing calls this directly

Calls 1

enforceMethod · 0.95

Tested by

no test coverage detected