aboutsummaryrefslogtreecommitdiff
path: root/app/auth/routes.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/auth/routes.py')
-rw-r--r--app/auth/routes.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/auth/routes.py b/app/auth/routes.py
index 21b1a67..57bd605 100644
--- a/app/auth/routes.py
+++ b/app/auth/routes.py
@@ -133,6 +133,9 @@ def logout():
@bp.route("/register", methods=("GET", "POST"))
def register():
+ if not current_app.config['ACCEPTING_REGISTRATION']:
+ return render_template("auth/no_register.html")
+
if current_user.is_authenticated:
return redirect(url_for("main.index"))
form = RegistrationForm()