We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 551356d commit acd5b54Copy full SHA for acd5b54
pkg/lib/aws/iam.go
@@ -51,11 +51,6 @@ func (c *Client) GetGroupsForUser(userName string) ([]iam.Group, error) {
51
}
52
53
func (c *Client) GetManagedPoliciesForUser(userName string) ([]iam.AttachedPolicy, error) {
54
- user, err := c.GetUser()
55
- if err != nil {
56
- return nil, err
57
- }
58
-
59
var policies []iam.AttachedPolicy
60
61
userManagedPolicies, err := c.IAM().ListAttachedUserPolicies(&iam.ListAttachedUserPoliciesInput{
@@ -68,7 +63,7 @@ func (c *Client) GetManagedPoliciesForUser(userName string) ([]iam.AttachedPolic
68
63
policies = append(policies, *policy)
69
64
70
65
71
- groups, err := c.GetGroupsForUser(*user.UserName)
66
+ groups, err := c.GetGroupsForUser(userName)
72
67
if err != nil {
73
return nil, err
74
0 commit comments