Merge pull request #4 from uvensys/remove_otp_field

Remove otp field
This commit is contained in:
steschuser 2021-06-01 15:28:41 +02:00 committed by GitHub
commit 567f66fbde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -180,6 +180,7 @@ class Setting(db.Model):
'URI': False
},
'ttl_options': '1 minute,5 minutes,30 minutes,60 minutes,24 hours',
'otp_field_enabled': True,
}
def __init__(self, id=None, name=None, value=None):

View file

@ -642,7 +642,7 @@ def setting_basic():
'pretty_ipv6_ptr', 'dnssec_admins_only',
'allow_user_create_domain', 'allow_user_view_history', 'bg_domain_updates', 'site_name',
'session_timeout', 'warn_session_timeout', 'ttl_options',
'pdns_api_timeout', 'verify_ssl_connections', 'verify_user_email'
'pdns_api_timeout', 'verify_ssl_connections', 'verify_user_email', 'otp_field_enabled'
]
return render_template('admin_setting_basic.html', settings=settings)

View file

@ -46,9 +46,11 @@
data-error="Please input your password" required {% if password %}value="{{ password }}" {% endif %}>
<span class="help-block with-errors"></span>
</div>
{% if SETTING.get('otp_field_enabled') %}
<div class="form-group">
<input type="otptoken" class="form-control" placeholder="OTP Token" name="otptoken">
</div>
{% endif %}
{% if SETTING.get('ldap_enabled') and SETTING.get('local_db_enabled') %}
<div class="form-group">
<select class="form-control" name="auth_method">