mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-06-14 12:06:06 +00:00
Set LDAP as source if both LDAP and Basic is enabled.
This commit is contained in:
@ -63,8 +63,12 @@
|
||||
<div class="form-group">
|
||||
<select class="form-control" name="auth_method">
|
||||
<option value="LOCAL">LOCAL Authentication</option>
|
||||
<option value="LDAP">LDAP Authentication</option>
|
||||
</select>
|
||||
{% if login_ldap_first_setting %}
|
||||
<option value="LDAP" selected="selected">LDAP Authentication</option>
|
||||
{% else %}
|
||||
<option value="LDAP">LDAP Authentication</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
{% elif ldap_enabled and not basic_enabled %}
|
||||
<div class="form-group">
|
||||
|
@ -40,6 +40,11 @@ def inject_record_helper_setting():
|
||||
record_helper_setting = Setting.query.filter(Setting.name == 'record_helper').first()
|
||||
return dict(record_helper_setting=strtobool(record_helper_setting.value))
|
||||
|
||||
@app.context_processor
|
||||
def inject_login_ldap_first_setting():
|
||||
login_ldap_first_setting = Setting.query.filter(Setting.name == 'login_ldap_first').first()
|
||||
return dict(login_ldap_first_setting=strtobool(login_ldap_first_setting.value))
|
||||
|
||||
@app.context_processor
|
||||
def inject_default_record_table_size_setting():
|
||||
default_record_table_size_setting = Setting.query.filter(Setting.name == 'default_record_table_size').first()
|
||||
|
Reference in New Issue
Block a user