aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r--pyaggr3g470r/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 57909e8a..2f8b5189 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -183,7 +183,10 @@ def signup():
"""
Signup page.
"""
- if (g.user is not None and g.user.is_authenticated()) or not os.environ.get("SELF_REGISTRATION", False):
+ if not os.environ.get("SELF_REGISTRATION", False):
+ flash(gettext("Self registration is disabled."), 'info')
+ return redirect(url_for('home'))
+ if g.user is not None and g.user.is_authenticated():
return redirect(url_for('home'))
form = SignupForm()
bgstack15