diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-09-23 15:49:12 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-09-23 15:49:12 +0100 |
| commit | b4b241600704cf1be963a1ff51191eec020434a4 (patch) | |
| tree | 5bf05359e43afa46283c737e084a1208c7e028f5 /app/auth | |
| parent | Bump version (diff) | |
| download | AnnotateChange-b4b241600704cf1be963a1ff51191eec020434a4.tar.gz AnnotateChange-b4b241600704cf1be963a1ff51191eec020434a4.zip | |
Add configuration option for accepting registrations
Diffstat (limited to 'app/auth')
| -rw-r--r-- | app/auth/routes.py | 3 |
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() |
