From 4af4ef33192012f59c2b7618bb5c41df788738d2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 14 Nov 2021 00:43:26 +0200 Subject: [PATCH] sdffsd --- files/routes/admin.py | 12 ++++++------ files/routes/awards.py | 4 ++-- files/routes/posts.py | 2 +- files/templates/submission.html | 8 ++++---- files/templates/userpage.html | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 13b67344e..412d240bc 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -56,7 +56,7 @@ def truescore(v): @limiter.limit("1/second") @admin_level_required(6) def revert_actions(v, username): - if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host): + if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host): user = get_user(username) if not user: abort(404) @@ -142,7 +142,7 @@ def club_ban(v, username): @limiter.limit("1/second") @admin_level_required(6) def make_admin(v, username): - if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host): + if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host): user = get_user(username) if not user: abort(404) user.admin_level = 6 @@ -155,7 +155,7 @@ def make_admin(v, username): @limiter.limit("1/second") @admin_level_required(6) def remove_admin(v, username): - if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host): + if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host): user = get_user(username) if not user: abort(404) user.admin_level = 0 @@ -168,7 +168,7 @@ def remove_admin(v, username): @limiter.limit("1/second") @admin_level_required(6) def make_fake_admin(v, username): - if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host): + if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host): user = get_user(username) if not user: abort(404) user.admin_level = 1 @@ -181,7 +181,7 @@ def make_fake_admin(v, username): @limiter.limit("1/second") @admin_level_required(6) def remove_fake_admin(v, username): - if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host): + if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host): user = get_user(username) if not user: abort(404) user.admin_level = 0 @@ -194,7 +194,7 @@ def remove_fake_admin(v, username): @limiter.limit("1/day") @admin_level_required(6) def monthly(v): - if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host): + if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host): thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id for u in g.db.query(User).filter(User.patron > 0).all(): if u.patron == 1: procoins = 2000 diff --git a/files/routes/awards.py b/files/routes/awards.py index b67cc78bf..3f4712555 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -601,7 +601,7 @@ def award_comment(cid, v): @admin_level_required(6) def admin_userawards_get(v): - if request.host == 'rdrama.net' and v.id not in [1,28,995,2513]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v) + if request.host == 'rdrama.net' and v.id not in [1,28,30,995,2513,3333]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v) return render_template("admin/awards.html", awards=list(AWARDS.values()), v=v) @app.post("/admin/awards") @@ -650,7 +650,7 @@ def admin_userawards_post(v): g.db.commit() - if request.host == 'rdrama.net' and v.id not in [1,28,995,2513]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v) + if request.host == 'rdrama.net' and v.id not in [1,28,30,995,2513,3333]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v) return render_template("admin/awards.html", awards=list(AWARDS.values()), v=v) diff --git a/files/routes/posts.py b/files/routes/posts.py index 973ecb070..fd5081068 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -214,7 +214,7 @@ def edit_post(pid, v): p = get_post(pid) - if p.author_id != v.id and not (v.admin_level == 6 and v.id in [1,28,995,2513]): abort(403) + if p.author_id != v.id and not (v.admin_level == 6 and v.id in [1,28,30,995,2513,3333]): abort(403) title = request.values.get("title", "").strip() body = request.values.get("body", "").strip() diff --git a/files/templates/submission.html b/files/templates/submission.html index c856b3dc6..9df0019c0 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -106,7 +106,7 @@ -{% if v and (v.id == p.author_id or v.admin_level == 6 and v.id in [1,28,995,2513]) %} +{% if v and (v.id == p.author_id or v.admin_level == 6 and v.id in [1,28,30,995,2513,3333]) %}