mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-07-02 04:16:19 +00:00
Support only having one auth method enabled (which isn't ldap/local)
This commit is contained in:
@ -321,6 +321,12 @@ def login():
|
||||
'authentication_type'] = 'LDAP' if auth_method != 'LOCAL' else 'LOCAL'
|
||||
remember_me = True if 'remember' in request.form else False
|
||||
|
||||
if auth_method == 'LOCAL' and not Setting().get('local_db_enabled'):
|
||||
return render_template(
|
||||
'login.html',
|
||||
saml_enabled=SAML_ENABLED,
|
||||
error='Local authentication is disabled')
|
||||
|
||||
user = User(username=username,
|
||||
password=password,
|
||||
plain_text_password=password)
|
||||
|
Reference in New Issue
Block a user