diff --git a/app/templates/login.html b/app/templates/login.html index d15a0ca..e36035b 100644 --- a/app/templates/login.html +++ b/app/templates/login.html @@ -50,7 +50,7 @@
-

Sign In

+

Sign In {{ login_title }}

{% if error %}
@@ -74,7 +74,9 @@
Remember Forgot Password?
+ {% if signup_enabled %} + {% endif %}
diff --git a/app/views.py b/app/views.py index a4a8bb8..c78f465 100644 --- a/app/views.py +++ b/app/views.py @@ -66,7 +66,10 @@ def login(): if request.method == 'GET': LDAP_ENABLED = True if 'LDAP_TYPE' in app.config.keys() else False - return render_template('login.html', ldap_enabled=LDAP_ENABLED) + LOGIN_TITLE = app.config['LOGIN_TITLE'] + BASIC_ENABLED = app.config['BASIC_ENABLED'] + SIGNUP_ENABLED = app.config['SIGNUP_ENABLED'] + return render_template('login.html', ldap_enabled=LDAP_ENABLED, login_title=LOGIN_TITLE, basic_enabled=BASIC_ENABLED, signup_enabled=SIGNUP_ENABLED) # process login username = request.form['username'] diff --git a/config_template.py b/config_template.py index 0e8f5ae..ef4e390 100644 --- a/config_template.py +++ b/config_template.py @@ -29,6 +29,10 @@ LDAP_USERNAME = 'cn=dnsuser,ou=users,ou=services,dc=duykhanh,dc=me' LDAP_PASSWORD = 'dnsuser' LDAP_SEARCH_BASE = 'ou=System Admins,ou=People,dc=duykhanh,dc=me' +#Default Auth +BASIC_ENABLED = True +SIGNUP_ENABLED = True + # POWERDNS CONFIG PDNS_STATS_URL = 'http://172.16.214.131:8081/' PDNS_API_KEY = 'you never know'