From 8f8b26266bf7e06d745e1553e5bb7c8390cffd62 Mon Sep 17 00:00:00 2001 From: Khanh Ngo Date: Wed, 13 Apr 2016 11:33:07 +0700 Subject: [PATCH] Don't show the LDAP authentication method in the login page if this feature isn't enabled --- app/templates/login.html | 2 ++ app/views.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/templates/login.html b/app/templates/login.html index 52ef018..627d517 100644 --- a/app/templates/login.html +++ b/app/templates/login.html @@ -75,7 +75,9 @@
diff --git a/app/views.py b/app/views.py index 9969349..a4a8bb8 100644 --- a/app/views.py +++ b/app/views.py @@ -65,7 +65,8 @@ def login(): return redirect(url_for('dashboard')) if request.method == 'GET': - return render_template('login.html') + LDAP_ENABLED = True if 'LDAP_TYPE' in app.config.keys() else False + return render_template('login.html', ldap_enabled=LDAP_ENABLED) # process login username = request.form['username']