forked from rDrama/rDrama
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))
|
||||
|
@ -73,6 +74,7 @@ def is_not_permabanned(f):
|
|||
|
||||
if not v: abort(401)
|
||||
|
||||
g.v = v
|
||||
check_ban_evade(v)
|
||||
|
||||
if v.is_banned and v.unban_utc == 0:
|
||||
|
@ -97,6 +99,7 @@ def admin_level_required(x):
|
|||
|
||||
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