forked from MarseyWorld/MarseyWorld
fix
parent
8a8a67a059
commit
f9fdeed771
|
@ -77,7 +77,9 @@ def get_logged_in_user():
|
||||||
|
|
||||||
g.v = v
|
g.v = v
|
||||||
|
|
||||||
if v: v.poor = session.get('poor')
|
if v:
|
||||||
|
v.poor = session.get('poor')
|
||||||
|
v.check_ban_evade()
|
||||||
|
|
||||||
if AEVANN_ID and request.headers.get("Cf-Ipcountry") == 'EG':
|
if AEVANN_ID and request.headers.get("Cf-Ipcountry") == 'EG':
|
||||||
if v and not v.username.startswith('Aev'):
|
if v and not v.username.startswith('Aev'):
|
||||||
|
@ -95,8 +97,6 @@ def auth_desired(f):
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
v = get_logged_in_user()
|
v = get_logged_in_user()
|
||||||
|
|
||||||
v.check_ban_evade()
|
|
||||||
|
|
||||||
return make_response(f(*args, v=v, **kwargs))
|
return make_response(f(*args, v=v, **kwargs))
|
||||||
|
|
||||||
wrapper.__name__ = f.__name__
|
wrapper.__name__ = f.__name__
|
||||||
|
@ -115,8 +115,6 @@ def auth_desired_with_logingate(f):
|
||||||
if not redir: redir = '/'
|
if not redir: redir = '/'
|
||||||
return redirect(redir)
|
return redirect(redir)
|
||||||
|
|
||||||
v.check_ban_evade()
|
|
||||||
|
|
||||||
return make_response(f(*args, v=v, **kwargs))
|
return make_response(f(*args, v=v, **kwargs))
|
||||||
|
|
||||||
wrapper.__name__ = f.__name__
|
wrapper.__name__ = f.__name__
|
||||||
|
@ -127,8 +125,6 @@ def auth_required(f):
|
||||||
v = get_logged_in_user()
|
v = get_logged_in_user()
|
||||||
if not v: abort(401)
|
if not v: abort(401)
|
||||||
|
|
||||||
v.check_ban_evade()
|
|
||||||
|
|
||||||
return make_response(f(*args, v=v, **kwargs))
|
return make_response(f(*args, v=v, **kwargs))
|
||||||
|
|
||||||
wrapper.__name__ = f.__name__
|
wrapper.__name__ = f.__name__
|
||||||
|
@ -142,8 +138,6 @@ def is_not_permabanned(f):
|
||||||
|
|
||||||
if not v: abort(401)
|
if not v: abort(401)
|
||||||
|
|
||||||
v.check_ban_evade()
|
|
||||||
|
|
||||||
if v.is_suspended_permanently:
|
if v.is_suspended_permanently:
|
||||||
return {"error": "Internal server error"}, 500
|
return {"error": "Internal server error"}, 500
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue