(schemaToFilter *schema.Schema, nobodyPolicies []*schema.Policy, policies []*schema.Policy)
| 332 | } |
| 333 | |
| 334 | func filterActions(schemaToFilter *schema.Schema, nobodyPolicies []*schema.Policy, policies []*schema.Policy) []schema.Action { |
| 335 | actions := make([]schema.Action, 0) |
| 336 | for _, action := range schemaToFilter.Actions { |
| 337 | if !hasMatchingPolicy(action, nobodyPolicies) && canUseAction(action, policies, schemaToFilter.URL) { |
| 338 | actions = append(actions, action) |
| 339 | } |
| 340 | } |
| 341 | return actions |
| 342 | } |
| 343 | |
| 344 | func hasMatchingPolicy(action schema.Action, policies []*schema.Policy) bool { |
| 345 | for _, policy := range policies { |
no test coverage detected