From 940f815f844a81c3cfdb5e7a32d3c50603cd3187 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Mon, 10 Oct 2022 23:15:09 -0700 Subject: [PATCH] loudly tell users they can't do this while suspended --- files/helpers/wrappers.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index e58fd72cb..110a511b5 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -129,18 +129,11 @@ def auth_required(f): return wrapper def is_not_permabanned(f): - def wrapper(*args, **kwargs): - v = get_logged_in_user() - if not v: abort(401) - - if v.is_suspended_permanently: - return {"error": "Internal server error"}, 500 - + if v.is_suspended_permanently: abort(403) return make_response(f(*args, v=v, **kwargs)) - wrapper.__name__ = f.__name__ return wrapper