mirror of
https://github.com/Mailu/Mailu.git
synced 2024-12-12 10:45:38 +02:00
Respect user enabled flag in admin authentication
This commit is contained in:
parent
49b17d31be
commit
c688970b32
@ -27,7 +27,8 @@ def admin_authentication():
|
||||
""" Fails if the user is not an authenticated admin.
|
||||
"""
|
||||
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 flask.abort(403)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user