fsdsfd
This commit is contained in:
parent
1e74386573
commit
1bdbd3cf1b
25 changed files with 104 additions and 716 deletions
|
@ -48,8 +48,7 @@ def auth_desired(f):
|
|||
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.headers.get("Authorization"): return {"error": "403 Forbidden"}, 403
|
||||
else: return render_template('errors/403.html', v=v), 403
|
||||
return redirect(request.full_path.replace('https://old.','https://'))
|
||||
check_ban_evade(v)
|
||||
|
||||
resp = make_response(f(*args, v=v, **kwargs))
|
||||
|
@ -67,7 +66,8 @@ def auth_required(f):
|
|||
|
||||
if not v: abort(401)
|
||||
|
||||
if request.host == 'old.rdrama.net' and not v.admin_level: abort(403)
|
||||
if request.host == 'old.rdrama.net' and not v.admin_level:
|
||||
return redirect(request.full_path.replace('https://old.','https://'))
|
||||
|
||||
check_ban_evade(v)
|
||||
|
||||
|
@ -88,8 +88,8 @@ def is_not_banned(f):
|
|||
|
||||
if not v: abort(401)
|
||||
|
||||
if request.host == 'old.rdrama.net' and not v.admin_level: abort(403)
|
||||
|
||||
if request.host == 'old.rdrama.net' and not v.admin_level:
|
||||
return redirect(request.full_path.replace('https://old.','https://'))
|
||||
check_ban_evade(v)
|
||||
|
||||
if v.is_suspended: return {"error": "You can't perform this action while being banned."}, 403
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue