diff --git a/release-notes/8.0.0/3934.md b/release-notes/8.0.0/3934.md new file mode 100644 index 0000000000..d6e7dd63e7 --- /dev/null +++ b/release-notes/8.0.0/3934.md @@ -0,0 +1 @@ +When installing Forgejo through the built-in installer, open (self-) registration is now disabled by default. diff --git a/routers/install/install.go b/routers/install/install.go index b84d77cfc2..8f4fafa6f5 100644 --- a/routers/install/install.go +++ b/routers/install/install.go @@ -151,7 +151,7 @@ func Install(ctx *context.Context) { form.EnableOpenIDSignIn = setting.Service.EnableOpenIDSignIn form.EnableOpenIDSignUp = setting.Service.EnableOpenIDSignUp - form.DisableRegistration = setting.Service.DisableRegistration + form.DisableRegistration = true // Force it to true, for the installation, to discourage creating instances with open registration, which invite all kinds of spam. form.AllowOnlyExternalRegistration = setting.Service.AllowOnlyExternalRegistration form.EnableCaptcha = setting.Service.EnableCaptcha form.RequireSignInView = setting.Service.RequireSignInView diff --git a/templates/install.tmpl b/templates/install.tmpl index 682e1e6511..6e537d2477 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -147,6 +147,12 @@ {{ctx.Locale.Tr "install.log_root_path_helper"}} +
+
+ + +
+
@@ -227,12 +233,6 @@
-
-
- - -
-