mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
minor simplification of authCanI code in resources collector
This commit is contained in:
@@ -457,11 +457,7 @@ func authCanI(client *kubernetes.Clientset, namespaces []string) (map[string][]b
|
||||
continue
|
||||
}
|
||||
|
||||
rules := []rbacv1.PolicyRule{}
|
||||
for _, rule := range convertToPolicyRule(response.Status) {
|
||||
rules = append(rules, rule)
|
||||
}
|
||||
|
||||
rules := convertToPolicyRule(response.Status)
|
||||
b, err := json.MarshalIndent(rules, "", " ")
|
||||
if err != nil {
|
||||
errorsByNamespace[namespace] = err.Error()
|
||||
|
||||
Reference in New Issue
Block a user