finishing touches and fixes on managed IPs database migration 16

This commit is contained in:
2021-07-09 14:35:23 -05:00
parent 862b14545b
commit 74d77224f7
2 changed files with 4 additions and 4 deletions

View File

@ -38,10 +38,10 @@ def admin_account_required(view):
@functools.wraps(view)
def wrapped_view(**kwargs):
if session.get("account") is None or session.get("csrf-token") is None:
return redirect(url_for("auth.login"))
return abort(404)
if session.get("account") not in current_app.config["ADMIN_PANEL_ALLOW_EMAIL_ADDRESSES"].split(","):
return redirect(url_for("auth.login"))
return abort(404)
return view(**kwargs)