fix: allow admins to create users (#11005)

PR #10978 introduced a regression, root
credential should be allowed to create users
This commit is contained in:
Harshavardhana 2020-11-30 21:53:23 -08:00 committed by GitHub
parent 2f564437ae
commit 7cbca43eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -379,7 +379,7 @@ func (a adminAPIHandlers) AddUser(w http.ResponseWriter, r *http.Request) {
}
// Not allowed to add a user with same access key as root credential
if owner {
if owner && accessKey == cred.AccessKey {
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAddUserInvalidArgument), r.URL)
return
}