Respect user enabled flag in admin authentication

This commit is contained in:
Stefan Auditor
2018-04-15 19:53:24 +02:00
parent c8540ddba7
commit e843f7ef1f

View File

@@ -27,7 +27,8 @@ def admin_authentication():
""" Fails if the user is not an authenticated admin. """ Fails if the user is not an authenticated admin.
""" """
if (not flask_login.current_user.is_anonymous if (not flask_login.current_user.is_anonymous
and flask_login.current_user.global_admin): and flask_login.current_user.global_admin
and flask_login.current_user.enabled):
return "" return ""
return flask.abort(403) return flask.abort(403)