MCPcopy Create free account
hub / github.com/cloudwan/gohan / filterPolicies

Function filterPolicies

cli/template.go:366–374  ·  view source on GitHub ↗
(principal string, policies []*schema.Policy)

Source from the content-addressed store, hash-verified

364}
365
366func filterPolicies(principal string, policies []*schema.Policy) []*schema.Policy {
367 var matchedPolicies []*schema.Policy
368 for _, policy := range policies {
369 if policy.Principal == principal {
370 matchedPolicies = append(matchedPolicies, policy)
371 }
372 }
373 return matchedPolicies
374}
375
376func getTemplateCommand() cli.Command {
377 return cli.Command{

Callers 1

filterSchemasForPolicyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected