From b4b241600704cf1be963a1ff51191eec020434a4 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 23 Sep 2019 15:49:12 +0100 Subject: Add configuration option for accepting registrations --- app/auth/routes.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/auth') 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() -- cgit v1.2.3