From b1e9e0301683fc1613f8dc0f185641ec1d12d67e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 7 Jan 2022 22:48:49 +0200 Subject: [PATCH] fsd --- files/helpers/wrappers.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index fcddb0d9e..01e453230 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -38,6 +38,7 @@ def auth_desired(f): def wrapper(*args, **kwargs): v = get_logged_in_user() + g.v = v check_ban_evade(v) @@ -53,9 +54,9 @@ def auth_required(f): def wrapper(*args, **kwargs): v = get_logged_in_user() - if not v: abort(401) + g.v = v check_ban_evade(v) resp = make_response(f(*args, v=v, **kwargs)) @@ -72,7 +73,8 @@ def is_not_permabanned(f): v = get_logged_in_user() if not v: abort(401) - + + g.v = v check_ban_evade(v) if v.is_banned and v.unban_utc == 0: @@ -96,7 +98,8 @@ def admin_level_required(x): if not v: abort(401) if v.admin_level < x: abort(403) - + + g.v = v response = f(*args, v=v, **kwargs) if isinstance(response, tuple): resp = make_response(response[0])