Disallow registration in install mode and adds redirects

This commit is contained in:
Mouse Reeve
2022-02-17 10:52:12 -08:00
parent 8e3c39d319
commit b4e0749f73
4 changed files with 19 additions and 4 deletions

View File

@@ -25,6 +25,10 @@ class Register(View):
def post(self, request):
"""join the server"""
settings = models.SiteSettings.get()
# no registration allowed when the site is being installed
if settings.install_mode:
raise PermissionDenied()
if not settings.allow_registration:
invite_code = request.POST.get("invite_code")