From 490d5765fafb962caca3407b804e83f3f0a651bc Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 26 Feb 2023 13:22:30 +0200 Subject: [PATCH] paypig-only threads --- files/classes/user.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index 75c145c50..cfad12e25 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -968,12 +968,15 @@ class User(Base): Whether a user can strictly see this item. can_see_content is used where content of a thing can be hidden from view ''' - browser = g and g.browser # TODO: request state object to pass to models for purity if isinstance(other, (Submission, Comment)): if not cls.can_see(user, other.author): return False if user and user.id == other.author_id: return True if isinstance(other, Submission): - if other.sub and not cls.can_see(user, other.subr): return False + if not (user and user.patron) and other.title.lower().startswith('[paypigs]'): + return False + if other.sub and not cls.can_see(user, other.subr): + return False + else: if other.parent_submission: if user and user.id == other.post.author_id: return True