Skip to content

Commit

Permalink
fix: if targetUser empty use parentUser for serviceAccounts (#12275)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed May 11, 2021
1 parent 56d4d7b commit fe21aa3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/admin-handlers-users.go
Expand Up @@ -530,6 +530,9 @@ func (a adminAPIHandlers) AddServiceAccount(w http.ResponseWriter, r *http.Reque
errors.New("service accounts cannot be generated for temporary credentials without parent")), r.URL)
return
}
if targetUser == "" {
targetUser = cred.ParentUser
}
}
targetGroups = cred.Groups
}
Expand Down

0 comments on commit fe21aa3

Please sign in to comment.