Skip to content

Commit f8c9cbf

Browse files
authored
Merge pull request #117 from replicatedhq/laverya/simplify-auth-cani
minor simplification of authCanI code in resources collector
2 parents 2208b76 + 26f3540 commit f8c9cbf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/collect/cluster_resources.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,7 @@ func authCanI(client *kubernetes.Clientset, namespaces []string) (map[string][]b
457457
continue
458458
}
459459

460-
rules := []rbacv1.PolicyRule{}
461-
for _, rule := range convertToPolicyRule(response.Status) {
462-
rules = append(rules, rule)
463-
}
464-
460+
rules := convertToPolicyRule(response.Status)
465461
b, err := json.MarshalIndent(rules, "", " ")
466462
if err != nil {
467463
errorsByNamespace[namespace] = err.Error()

0 commit comments

Comments
 (0)