forked from 3wordchant/capsul-flask
finishing touches and fixes on managed IPs database migration 16
This commit is contained in:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user