mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 23:20:27 +00:00
Add auth params to login page.
This commit is contained in:
parent
bca300587d
commit
dfaa14e2e4
@ -50,7 +50,7 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- BEGIN LOGIN FORM -->
|
<!-- BEGIN LOGIN FORM -->
|
||||||
<form class="login-form" action="" method="post">
|
<form class="login-form" action="" method="post">
|
||||||
<h3 class="form-title">Sign In</h3>
|
<h3 class="form-title">Sign In {{ login_title }}</h3>
|
||||||
{% if error %}
|
{% if error %}
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
<button class="close" data-close="alert"></button>
|
<button class="close" data-close="alert"></button>
|
||||||
@ -74,7 +74,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<select class="form-control" name="auth_method">
|
<select class="form-control" name="auth_method">
|
||||||
|
{% if basic_enabled %}
|
||||||
<option value="LOCAL">Default Authentication</option>
|
<option value="LOCAL">Default Authentication</option>
|
||||||
|
{% endif %}
|
||||||
{% if ldap_enabled %}
|
{% if ldap_enabled %}
|
||||||
<option value="LDAP">LDAP Authentication</option>
|
<option value="LDAP">LDAP Authentication</option>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -86,11 +88,13 @@
|
|||||||
<input type="checkbox" name="remember" value="1"/>Remember </label>
|
<input type="checkbox" name="remember" value="1"/>Remember </label>
|
||||||
<a href="javascript:;" id="forget-password" class="forget-password">Forgot Password?</a>
|
<a href="javascript:;" id="forget-password" class="forget-password">Forgot Password?</a>
|
||||||
</div>
|
</div>
|
||||||
|
{% if signup_enabled %}
|
||||||
<div class="create-account">
|
<div class="create-account">
|
||||||
<p>
|
<p>
|
||||||
<a href="javascript:;" id="register-btn" class="uppercase">Create an account</a>
|
<a href="javascript:;" id="register-btn" class="uppercase">Create an account</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</form>
|
</form>
|
||||||
<!-- END LOGIN FORM -->
|
<!-- END LOGIN FORM -->
|
||||||
<!-- BEGIN FORGOT PASSWORD FORM -->
|
<!-- BEGIN FORGOT PASSWORD FORM -->
|
||||||
|
@ -66,7 +66,10 @@ def login():
|
|||||||
|
|
||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
LDAP_ENABLED = True if 'LDAP_TYPE' in app.config.keys() else False
|
LDAP_ENABLED = True if 'LDAP_TYPE' in app.config.keys() else False
|
||||||
return render_template('login.html', ldap_enabled=LDAP_ENABLED)
|
LOGIN_TITLE = app.config['LOGIN_TITLE']
|
||||||
|
BASIC_ENABLED = app.config['BASIC_ENABLED']
|
||||||
|
SIGNUP_ENABLED = app.config['SIGNUP_ENABLED']
|
||||||
|
return render_template('login.html', ldap_enabled=LDAP_ENABLED, login_title=LOGIN_TITLE, basic_enabled=BASIC_ENABLED, signup_enabled=SIGNUP_ENABLED)
|
||||||
|
|
||||||
# process login
|
# process login
|
||||||
username = request.form['username']
|
username = request.form['username']
|
||||||
|
@ -29,6 +29,10 @@ LDAP_USERNAME = 'cn=dnsuser,ou=users,ou=services,dc=duykhanh,dc=me'
|
|||||||
LDAP_PASSWORD = 'dnsuser'
|
LDAP_PASSWORD = 'dnsuser'
|
||||||
LDAP_SEARCH_BASE = 'ou=System Admins,ou=People,dc=duykhanh,dc=me'
|
LDAP_SEARCH_BASE = 'ou=System Admins,ou=People,dc=duykhanh,dc=me'
|
||||||
|
|
||||||
|
#Default Auth
|
||||||
|
BASIC_ENABLED = True
|
||||||
|
SIGNUP_ENABLED = True
|
||||||
|
|
||||||
# POWERDNS CONFIG
|
# POWERDNS CONFIG
|
||||||
PDNS_STATS_URL = 'http://172.16.214.131:8081/'
|
PDNS_STATS_URL = 'http://172.16.214.131:8081/'
|
||||||
PDNS_API_KEY = 'you never know'
|
PDNS_API_KEY = 'you never know'
|
||||||
|
Loading…
Reference in New Issue
Block a user