summaryrefslogtreecommitdiffstats
path: root/routers/install
diff options
context:
space:
mode:
authorGergely Nagy <forgejo@gergo.csillger.hu>2024-05-28 08:57:30 +0200
committerGergely Nagy <forgejo@gergo.csillger.hu>2024-05-28 08:57:30 +0200
commit9fc61cae484d4a7ec493b99d49d9a702ecadb28f (patch)
tree3ffc88b022fdd472728dcf41158cf6c91608f08d /routers/install
parentinstall: Make "Disable self-registration" more prominent (diff)
downloadforgejo-9fc61cae484d4a7ec493b99d49d9a702ecadb28f.tar.xz
forgejo-9fc61cae484d4a7ec493b99d49d9a702ecadb28f.zip
install: Force DisableRegistration on during install
When installing Forgejo via the on-line installer, force DisableRegistration to true, to discourage creating instances with open registration. Because open registration requires constant vigil to fight off spammers of all kinds, it is not a great default. It should be a conscious decision. This change is made in an effort to make the choice of running an instance with open registration a conscious choice, rather than simply the default. Partially addresses #3925. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
Diffstat (limited to 'routers/install')
-rw-r--r--routers/install/install.go2
1 files changed, 1 insertions, 1 deletions
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