fix: allow sub-admin to modify password for other users (#11039)

fixes #11037
This commit is contained in:
Harshavardhana 2020-12-06 20:36:34 -08:00 committed by GitHub
parent 9c53cc1b83
commit 8d036ed6d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -387,9 +387,9 @@ func (a adminAPIHandlers) AddUser(w http.ResponseWriter, r *http.Request) {
implicitPerm := accessKey == cred.AccessKey
if !implicitPerm {
if !globalIAMSys.IsAllowed(iampolicy.Args{
AccountName: accessKey,
AccountName: cred.AccessKey,
Action: iampolicy.CreateUserAdminAction,
ConditionValues: getConditionValues(r, "", accessKey, claims),
ConditionValues: getConditionValues(r, "", cred.AccessKey, claims),
IsOwner: owner,
Claims: claims,
}) {