mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 14:40:27 +00:00
Fix SignUp config feature
This commit is contained in:
parent
729a5d0e9d
commit
a14ccec39e
@ -92,7 +92,9 @@
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
{% if signup_enabled %}
|
||||
<a href="{{ url_for('register') }}" class="text-center">Create an account </a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
<div class="login-box-footer">
|
||||
|
@ -90,7 +90,11 @@ def error(code, msg=None):
|
||||
|
||||
@app.route('/register', methods=['GET'])
|
||||
def register():
|
||||
return render_template('register.html')
|
||||
SIGNUP_ENABLED = app.config['SIGNUP_ENABLED']
|
||||
if SIGNUP_ENABLED:
|
||||
return render_template('register.html')
|
||||
else:
|
||||
return render_template('errors/404.html'), 404
|
||||
|
||||
@app.route('/login', methods=['GET', 'POST'])
|
||||
@login_manager.unauthorized_handler
|
||||
|
Loading…
Reference in New Issue
Block a user