Fix behavior of AddServiceAccountLDAP for non-admin users (#20442)

This commit is contained in:
Taran Pelkey
2024-09-16 19:04:51 -04:00
committed by GitHub
parent 70d40083e9
commit 3c82cf9327
2 changed files with 12 additions and 4 deletions

View File

@@ -190,7 +190,7 @@ func (a adminAPIHandlers) AttachDetachPolicyLDAP(w http.ResponseWriter, r *http.
//
// PUT /minio/admin/v3/idp/ldap/add-service-account
func (a adminAPIHandlers) AddServiceAccountLDAP(w http.ResponseWriter, r *http.Request) {
ctx, cred, opts, createReq, targetUser, APIError := commonAddServiceAccount(r)
ctx, cred, opts, createReq, targetUser, APIError := commonAddServiceAccount(r, true)
if APIError.Code != "" {
writeErrorResponseJSON(ctx, w, APIError, r.URL)
return