diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index a4b677e43ba..a34507657b3 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -383,6 +383,7 @@ password_uppercase_one = At least one uppercase character password_digit_one = At least one digit password_special_one = At least one special character (punctuation, brackets, quotes, etc.) enterred_invalid_repo_name = The repository name you entered is incorrect. +enterred_invalid_org_name = The organization name you entered is incorrect. enterred_invalid_owner_name = The new owner name is not valid. enterred_invalid_password = The password you entered is incorrect. user_not_exist = The user does not exist. diff --git a/options/locale/locale_pl-PL.ini b/options/locale/locale_pl-PL.ini index f96650e38ae..65d0139f073 100644 --- a/options/locale/locale_pl-PL.ini +++ b/options/locale/locale_pl-PL.ini @@ -364,6 +364,7 @@ password_uppercase_one=Co najmniej jedna duża litera password_digit_one=Co najmniej jedna cyfra password_special_one=Co najmniej jeden znak specjalny (interpunkcja, nawiasy, cudzysłowy, itp.) enterred_invalid_repo_name=Wprowadzona nazwa repozytorium jest niepoprawna. +enterred_invalid_org_name=Wprowadzona nazwa organizacji jest niepoprawna. enterred_invalid_owner_name=Nowa nazwa właściciela nie jest prawidłowa. enterred_invalid_password=Wprowadzone hasło jest nieprawidłowe. user_not_exist=Użytkownik nie istnieje. diff --git a/routers/org/setting.go b/routers/org/setting.go index ac120662581..a01b2c862a1 100644 --- a/routers/org/setting.go +++ b/routers/org/setting.go @@ -145,12 +145,9 @@ func SettingsDelete(ctx *context.Context) { org := ctx.Org.Organization if ctx.Req.Method == "POST" { - if _, err := models.UserSignIn(ctx.User.Name, ctx.Query("password")); err != nil { - if models.IsErrUserNotExist(err) { - ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_password"), tplSettingsDelete, nil) - } else { - ctx.ServerError("UserSignIn", err) - } + if org.Name != ctx.Query("org_name") { + ctx.Data["Err_OrgName"] = true + ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_org_name"), tplSettingsDelete, nil) return } diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl index 9743d71cbff..d4911e74b85 100644 --- a/templates/org/settings/delete.tmpl +++ b/templates/org/settings/delete.tmpl @@ -15,10 +15,9 @@