forked from MarseyWorld/MarseyWorld
fsd
parent
384aaf9b66
commit
b1e9e03016
|
@ -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])
|
||||
|
|
Loading…
Reference in New Issue