We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 769ca7a commit 1a2d911Copy full SHA for 1a2d911
pkg/authorization/api/helpers.go
@@ -14,6 +14,20 @@ import (
14
)
15
16
func ExpandResources(rawResources sets.String) sets.String {
17
+ // we only need to expand groups if the exist and we don't create them with groups
18
+ // by default. Only accept the cost of expansion if we're doing work.
19
+ needsExpansion := false
20
+ for rawResource := range rawResources {
21
+ if strings.Index(currResource, ResourceGroupPrefix+":") == 0 {
22
+ needsExpansion = true
23
+ break
24
+ }
25
+
26
27
+ if !needsExpansion {
28
+ return rawResources
29
30
31
ret := sets.String{}
32
toVisit := rawResources.List()
33
visited := sets.String{}
0 commit comments