Converge PolicyDBGet functions in IAM (#11891)

This commit is contained in:
Aditya Manthramurthy
2021-03-25 00:38:15 -07:00
committed by GitHub
parent d7f32ad649
commit b4d8bcf644
3 changed files with 35 additions and 35 deletions

View File

@@ -748,7 +748,11 @@ func (a adminAPIHandlers) AccountInfoHandler(w http.ResponseWriter, r *http.Requ
case MinIOUsersSysType:
policies, err = globalIAMSys.PolicyDBGet(accountName, false)
case LDAPUsersSysType:
policies, err = globalIAMSys.PolicyDBGetLDAP(cred.ParentUser, cred.Groups...)
parentUser := accountName
if cred.ParentUser != "" {
parentUser = cred.ParentUser
}
policies, err = globalIAMSys.PolicyDBGet(parentUser, false, cred.Groups...)
default:
err = errors.New("should not happen!")
}