forked from MarseyWorld/MarseyWorld
fdsfds
parent
11fa6ed9a8
commit
e50b2ba7e1
|
@ -48,7 +48,7 @@ def auth_desired(f):
|
||||||
v = get_logged_in_user()
|
v = get_logged_in_user()
|
||||||
|
|
||||||
if request.host == 'old.rdrama.net' and not (v and v.admin_level) and '/log' not in request.path:
|
if request.host == 'old.rdrama.net' and not (v and v.admin_level) and '/log' not in request.path:
|
||||||
return request.full_path.replace('old.','')
|
return request.url.replace('old.','')
|
||||||
check_ban_evade(v)
|
check_ban_evade(v)
|
||||||
|
|
||||||
resp = make_response(f(*args, v=v, **kwargs))
|
resp = make_response(f(*args, v=v, **kwargs))
|
||||||
|
@ -67,7 +67,7 @@ def auth_required(f):
|
||||||
if not v: abort(401)
|
if not v: abort(401)
|
||||||
|
|
||||||
if request.host == 'old.rdrama.net' and not v.admin_level:
|
if request.host == 'old.rdrama.net' and not v.admin_level:
|
||||||
return redirect(request.full_path.replace('old.',''))
|
return redirect(request.url.replace('old.',''))
|
||||||
|
|
||||||
check_ban_evade(v)
|
check_ban_evade(v)
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ def is_not_banned(f):
|
||||||
if not v: abort(401)
|
if not v: abort(401)
|
||||||
|
|
||||||
if request.host == 'old.rdrama.net' and not v.admin_level:
|
if request.host == 'old.rdrama.net' and not v.admin_level:
|
||||||
return redirect(request.full_path.replace('old.',''))
|
return redirect(request.url.replace('old.',''))
|
||||||
check_ban_evade(v)
|
check_ban_evade(v)
|
||||||
|
|
||||||
if v.is_suspended: return {"error": "You can't perform this action while being banned."}, 403
|
if v.is_suspended: return {"error": "You can't perform this action while being banned."}, 403
|
||||||
|
|
Loading…
Reference in New Issue