forked from MarseyWorld/MarseyWorld
sfdsfd
parent
e50b2ba7e1
commit
4d4852976e
|
@ -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.url.replace('old.','')
|
return redirect(request.url.replace('https://old.','https://'))
|
||||||
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.url.replace('old.',''))
|
return redirect(request.url.replace('https://old.','https://'))
|
||||||
|
|
||||||
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.url.replace('old.',''))
|
return redirect(request.url.replace('https://old.','https://'))
|
||||||
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