diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-08-25 13:48:29 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-08-25 13:48:29 +0200 |
commit | 1a22cef1e411044719063a1f97ab1fdfbf064621 (patch) | |
tree | b054aa2944d64e3b634f9f8dc66827df9084863d /pyaggr3g470r | |
parent | It is now possible to enable or disable self registration with an environment... (diff) | |
download | newspipe-1a22cef1e411044719063a1f97ab1fdfbf064621.tar.gz newspipe-1a22cef1e411044719063a1f97ab1fdfbf064621.tar.bz2 newspipe-1a22cef1e411044719063a1f97ab1fdfbf064621.zip |
Display a message when self registration is disabled.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r-- | pyaggr3g470r/views.py | 5 |
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() |