From 78351abc4ca85e6af2576ad88c444430203a9c33 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 1 Jan 2023 03:17:07 +0200 Subject: [PATCH] clean up legacy stuff --- files/classes/user.py | 2 +- files/helpers/config/const.py | 2 +- files/routes/admin.py | 2 +- files/routes/asset_submissions.py | 4 ++-- files/routes/awards.py | 2 +- files/routes/static.py | 2 +- files/templates/admin/admin_home.html | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index 2cd005261e..327df84175 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -306,7 +306,7 @@ class User(Base): @lazy def mods(self, sub): if self.is_suspended_permanently or self.shadowbanned: return False - if self.id in {AEVANN_ID, SNAKES_ID}: return True + if self.id in {AEVANN_ID}: return True try: return any(map(lambda x: x.sub == sub, self.sub_mods)) except: diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 5b945f17aa..407f1872fc 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -649,7 +649,7 @@ TIERS_ID_TO_NAME = { 6: "Rich Bich", } -BADGE_BLACKLIST = { # only grantable by AEVANN_ID and SNAKES_ID +BADGE_BLACKLIST = { # only grantable by AEVANN_ID 1, 2, 6, 10, 11, 12, # Alpha, Verified Email, Beta, Recruiter x3 16, 17, 143, 21, 22, 23, 24, 25, 26, 27, # Marsey Artist x3 / Patron Tiers 94, 95, 96, 97, 98, 109, 67, 68, 83, 84, 87, 90, 179, 185, # Award Status except Y'all-seeing eye diff --git a/files/routes/admin.py b/files/routes/admin.py index e8cd15440c..664c06cf9a 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -509,7 +509,7 @@ def under_attack(v): def admin_badges_grantable_list(v): query = g.db.query(BadgeDef) - if BADGE_BLACKLIST and v.id not in {AEVANN_ID, SNAKES_ID}: + if BADGE_BLACKLIST and v.id not in {AEVANN_ID}: query = query.filter(BadgeDef.id.notin_(BADGE_BLACKLIST)) badge_types = query.order_by(BadgeDef.id).all() diff --git a/files/routes/asset_submissions.py b/files/routes/asset_submissions.py index f17c4629df..a59fec65a7 100644 --- a/files/routes/asset_submissions.py +++ b/files/routes/asset_submissions.py @@ -13,8 +13,8 @@ from files.routes.wrappers import * from files.__main__ import app, cache, limiter ASSET_TYPES = (Marsey, HatDef) -CAN_APPROVE_ASSETS = (AEVANN_ID, CARP_ID, SNAKES_ID) -CAN_UPDATE_ASSETS = (AEVANN_ID, CARP_ID, SNAKES_ID) +CAN_APPROVE_ASSETS = (AEVANN_ID, CARP_ID) +CAN_UPDATE_ASSETS = (AEVANN_ID, CARP_ID) @app.get("/submit/marseys") @auth_required diff --git a/files/routes/awards.py b/files/routes/awards.py index 151c765554..613559e74b 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -169,7 +169,7 @@ def award_thing(v, thing_type, id): else: safe_username = f"@{author.username}" - if SITE == 'rdrama.net' and author.id == PIZZASHILL_ID and v.id not in {AEVANN_ID, SNAKES_ID}: + if SITE == 'rdrama.net' and author.id == PIZZASHILL_ID and v.id not in {AEVANN_ID}: abort(403, f"{safe_username} is immune to awards.") if kind == "benefactor" and author.id == v.id: diff --git a/files/routes/static.py b/files/routes/static.py index 64bfcb4c25..f35c2177bf 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -106,7 +106,7 @@ def daily_chart(v:User): @app.get("/paypigs") @admin_level_required(PERMS['VIEW_PATRONS']) def patrons(v): - if AEVANN_ID and v.id not in {AEVANN_ID, CARP_ID, SNAKES_ID}: + if AEVANN_ID and v.id not in {AEVANN_ID, CARP_ID}: abort(404) users = g.db.query(User).filter(User.patron > 0).order_by(User.patron.desc(), User.id).all() diff --git a/files/templates/admin/admin_home.html b/files/templates/admin/admin_home.html index 43ae041bac..cb6acd4c4a 100644 --- a/files/templates/admin/admin_home.html +++ b/files/templates/admin/admin_home.html @@ -51,7 +51,7 @@
  • Chudded Users
  • Currently Grassed Users
  • {%- endif %} - {% if FEATURES['MARSEYBUX'] and (not AEVANN_ID or v.id in (AEVANN_ID, CARP_ID, SNAKES_ID)) -%} + {% if FEATURES['MARSEYBUX'] and (not AEVANN_ID or v.id in (AEVANN_ID, CARP_ID)) -%}
  • Patrons
  • {%- endif %} {% if v.admin_level >= PERMS['VIEW_ACTIVE_USERS'] %}