Fix policy setting error in LDAP setups (#9303)

Fixes #8667

In addition to the above, if the user is mapped to a policy or 
belongs in a group, the user-info API returns this information, 
but otherwise, the API will now return a non-existent user error.
This commit is contained in:
Aditya Manthramurthy
2020-04-09 01:04:08 -07:00
committed by GitHub
parent e20e08d700
commit 6bb693488c
2 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -703,7 +703,7 @@ func (a adminAPIHandlers) SetPolicyForUserOrGroup(w http.ResponseWriter, r *http
if !isGroup {
ok, err := globalIAMSys.IsTempUser(entityName)
if err != nil {
if err != nil && err != errNoSuchUser {
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
return
}