From 74ad914df798398fabed082fa5d6fb9f7521bf04 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 25 Aug 2014 13:44:46 +0200 Subject: It is now possible to enable or disable self registration with an environment variable. --- pyaggr3g470r/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyaggr3g470r') diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index 26a483c1..57909e8a 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -183,7 +183,7 @@ def signup(): """ Signup page. """ - if g.user is not None and g.user.is_authenticated(): + if (g.user is not None and g.user.is_authenticated()) or not os.environ.get("SELF_REGISTRATION", False): return redirect(url_for('home')) form = SignupForm() -- cgit