mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 14:40:27 +00:00
Don't show the LDAP authentication method in the login page if this feature isn't enabled
This commit is contained in:
parent
53b4fe2f8b
commit
8f8b26266b
@ -75,7 +75,9 @@
|
||||
<div class="form-group">
|
||||
<select class="form-control" name="auth_method">
|
||||
<option value="LOCAL">Default Authentication</option>
|
||||
{% if ldap_enabled %}
|
||||
<option value="LDAP">LDAP Authentication</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
|
@ -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']
|
||||
|
Loading…
Reference in New Issue
Block a user