fix: allow admins to create users (#11005)

PR #10978 introduced a regression, root
credential should be allowed to create users
master
Harshavardhana 4 years ago committed by GitHub
parent 2f564437ae
commit 7cbca43eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/admin-handlers-users.go

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

Loading…
Cancel
Save