mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 22:50:26 +00:00
Set LDAP as source if both LDAP and Basic is enabled.
This commit is contained in:
parent
ea42c78b9a
commit
9dc3c3ff98
@ -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()
|
||||
|
@ -12,6 +12,7 @@ user_role = Role('User', 'User')
|
||||
maintenance_setting = Setting('maintenance', 'False')
|
||||
fullscreen_layout_setting = Setting('fullscreen_layout', 'True')
|
||||
record_helper_setting = Setting('record_helper', 'True')
|
||||
login_ldap_first_setting = Setting('login_ldap_first', 'True')
|
||||
default_record_table_size_setting = Setting('default_record_table_size', '15')
|
||||
default_domain_table_size_setting = Setting('default_domain_table_size', '10')
|
||||
db.session.add(admin_role)
|
||||
@ -19,6 +20,7 @@ db.session.add(user_role)
|
||||
db.session.add(maintenance_setting)
|
||||
db.session.add(fullscreen_layout_setting)
|
||||
db.session.add(record_helper_setting)
|
||||
db.session.add(login_ldap_first_setting)
|
||||
db.session.add(default_record_table_size_setting)
|
||||
db.session.add(default_domain_table_size_setting)
|
||||
db.session.commit()
|
||||
|
Loading…
Reference in New Issue
Block a user