diff --git a/files/classes/user.py b/files/classes/user.py index aab9a5850..0850656b4 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -1007,7 +1007,7 @@ class User(Base): if other.deleted_utc: return False if other.author.shadowbanned and not (user and user.can_see_shadowbanned): return False if isinstance(other, Submission): - if other.sub in ('chudrama', 'masterbaiters', 'countryclub') and not (user and user.can_see_hole(other.sub)): + if other.sub in ('chudrama', 'countryclub') and not (user and user.can_see_hole(other.sub)): return False else: if other.parent_submission and not cls.can_see_content(user, other.post): return False @@ -1036,7 +1036,7 @@ class User(Base): if other.parent_submission and other.post.sub and not cls.can_see(user, other.post.subr): return False # if other.parent_submission and not cls.can_see(user, other.post): return False elif isinstance(other, Sub): - if other.name in ('chudrama', 'masterbaiters', 'countryclub') and not (user and user.can_see_hole(other.name)): + if other.name in ('chudrama', 'countryclub') and not (user and user.can_see_hole(other.name)): return False elif isinstance(other, User): return (user and user.id == other.id) or (user and user.can_see_shadowbanned) or not other.shadowbanned @@ -1045,7 +1045,6 @@ class User(Base): @lazy def can_see_hole(self, hole): if hole == 'chudrama': return self.can_see_chudrama - if hole == 'masterbaiters': return self.can_see_masterbaiters if hole == 'countryclub': return self.can_see_countryclub return True @@ -1069,15 +1068,6 @@ class User(Base): if self.truescore >= 1000: return True return False - @property - @lazy - def can_see_masterbaiters(self): - if self.shadowbanned: return False - if self.is_suspended_permanently: return False - if self.agendaposter == 1: return False - if self.truescore >= 1: return True - return False - @property @lazy def can_post_in_ghost_threads(self): diff --git a/files/routes/subs.py b/files/routes/subs.py index 755a5d57e..30338e7d1 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -123,7 +123,7 @@ def block_sub(v:User, sub): @auth_required def unblock_sub(v:User, sub): sub = get_sub_by_name(sub) - if sub.name in ('chudrama', 'masterbaiters', 'countryclub') and not v.can_see_hole(sub.name): + if sub.name in ('chudrama', 'countryclub') and not v.can_see_hole(sub.name): abort(403) block = g.db.query(SubBlock).filter_by(user_id=v.id, sub=sub.name).one_or_none() @@ -164,7 +164,7 @@ def unsubscribe_sub(v:User, sub): @auth_required def follow_sub(v:User, sub): sub = get_sub_by_name(sub) - if sub.name in ('chudrama', 'masterbaiters', 'countryclub') and not v.can_see_hole(sub.name): + if sub.name in ('chudrama', 'countryclub') and not v.can_see_hole(sub.name): abort(403) existing = g.db.query(SubSubscription).filter_by(user_id=v.id, sub=sub.name).one_or_none() if not existing: @@ -189,7 +189,7 @@ def unfollow_sub(v:User, sub): @auth_required def mods(v:User, sub): sub = get_sub_by_name(sub) - if sub.name in ('chudrama', 'masterbaiters', 'countryclub') and not v.can_see_hole(sub.name): + if sub.name in ('chudrama', 'countryclub') and not v.can_see_hole(sub.name): abort(403) users = g.db.query(User, Mod).join(Mod).filter_by(sub=sub.name).order_by(Mod.created_utc).all() @@ -200,7 +200,7 @@ def mods(v:User, sub): @auth_required def sub_exilees(v:User, sub): sub = get_sub_by_name(sub) - if sub.name in ('chudrama', 'masterbaiters', 'countryclub') and not v.can_see_hole(sub.name): + if sub.name in ('chudrama', 'countryclub') and not v.can_see_hole(sub.name): abort(403) users = g.db.query(User, Exile).join(Exile, Exile.user_id==User.id) \ .filter_by(sub=sub.name) \ @@ -213,7 +213,7 @@ def sub_exilees(v:User, sub): @auth_required def sub_blockers(v:User, sub): sub = get_sub_by_name(sub) - if sub.name in ('chudrama', 'masterbaiters', 'countryclub') and not v.can_see_hole(sub.name): + if sub.name in ('chudrama', 'countryclub') and not v.can_see_hole(sub.name): abort(403) users = g.db.query(User, SubBlock).join(SubBlock) \ .filter_by(sub=sub.name) \ @@ -227,7 +227,7 @@ def sub_blockers(v:User, sub): @auth_required def sub_followers(v:User, sub): sub = get_sub_by_name(sub) - if sub.name in ('chudrama', 'masterbaiters', 'countryclub') and not v.can_see_hole(sub.name): + if sub.name in ('chudrama', 'countryclub') and not v.can_see_hole(sub.name): abort(403) users = g.db.query(User, SubSubscription).join(SubSubscription) \ .filter_by(sub=sub.name) \ @@ -708,7 +708,7 @@ def mod_unpin(cid, v): @auth_required def hole_log(v:User, sub): sub = get_sub_by_name(sub) - if sub.name in ('chudrama', 'masterbaiters', 'countryclub') and not v.can_see_hole(sub.name): + if sub.name in ('chudrama', 'countryclub') and not v.can_see_hole(sub.name): abort(403) try: page = max(int(request.values.get("page", 1)), 1) except: page = 1 @@ -749,7 +749,7 @@ def hole_log(v:User, sub): @auth_required def hole_log_item(id, v, sub): sub = get_sub_by_name(sub) - if sub.name in ('chudrama', 'masterbaiters', 'countryclub') and not v.can_see_hole(sub.name): + if sub.name in ('chudrama', 'countryclub') and not v.can_see_hole(sub.name): abort(403) try: id = int(id) except: abort(404)