Add enable flag for LDAP IDP config (#16805)

This commit is contained in:
Aditya Manthramurthy
2023-03-16 11:58:59 -07:00
committed by GitHub
parent d1e775313d
commit 58266c9e2c
4 changed files with 146 additions and 125 deletions

View File

@@ -86,7 +86,7 @@ func (a adminAPIHandlers) addOrUpdateIDPHandler(ctx context.Context, w http.Resp
if idpCfgType == madmin.LDAPIDPCfg && cfgName != madmin.Default {
// LDAP does not support multiple configurations. So cfgName must be
// empty or `madmin.Default`.
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrBadRequest), r.URL)
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigLDAPNonDefaultConfigName), r.URL)
return
}
}