From 9deea2ffe2804e114d91d8939211cbe17a4d4966 Mon Sep 17 00:00:00 2001 From: Stefan Benten Date: Tue, 6 Oct 2020 12:25:12 +0200 Subject: [PATCH] satellite/console: disable account deletion via API Change-Id: Ia8e43284c90fb2b833eb601e2c8f701cb5a4d9c0 --- .../console/consoleweb/consoleapi/auth.go | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/satellite/console/consoleweb/consoleapi/auth.go b/satellite/console/consoleweb/consoleapi/auth.go index a1d1a164b..d0c3c1b72 100644 --- a/satellite/console/consoleweb/consoleapi/auth.go +++ b/satellite/console/consoleweb/consoleapi/auth.go @@ -235,26 +235,14 @@ func (a *Auth) GetAccount(w http.ResponseWriter, r *http.Request) { } } -// DeleteAccount - authorizes user and deletes account by password. +// DeleteAccount authorizes user and deletes account by password. func (a *Auth) DeleteAccount(w http.ResponseWriter, r *http.Request) { ctx := r.Context() var err error defer mon.Task()(&ctx)(&err) - var deleteRequest struct { - Password string `json:"password"` - } - - err = json.NewDecoder(r.Body).Decode(&deleteRequest) - if err != nil { - a.serveJSONError(w, err) - return - } - - err = a.service.DeleteAccount(ctx, deleteRequest.Password) - if err != nil { - a.serveJSONError(w, err) - } + // We do not want to allow account deletion via API currently. + a.serveJSONError(w, ErrAuthAPI.New("not implemented")) } // ChangePassword auth user, changes users password for a new one.