fix: if targetUser empty use parentUser for serviceAccounts (#12275)

This commit is contained in:
Harshavardhana
2021-05-11 13:02:00 -07:00
committed by GitHub
parent 56d4d7b8b1
commit fe21aa356c

View File

@@ -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
}