From 5dda70aa9eba9bf5c2560313760c571bc9acd2c7 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Sat, 19 Nov 2022 05:47:53 -0600 Subject: [PATCH] fix minor can_see bug --- files/classes/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/classes/user.py b/files/classes/user.py index 1a4fd2ddf..be3c9add9 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -559,13 +559,13 @@ class LoggedOutUser(): content of a thing can be hidden from view ''' if isinstance(other, (Submission, Comment)): - if not self.can_see(other.author): return False if self and self.id == other.author_id: return True if isinstance(other, Submission): if other.sub and not self.can_see(other.subr): return False else: if not other.parent_submission: if not self: return False + if not self.can_see(other.author): return False if not other.sentto: return True # handled by Notification if other.sentto == MODMAIL_ID: return user.admin_level >= PERMS['VIEW_MODMAIL'] # type: ignore if other.sentto != user.id: return user.admin_level >= PERMS['POST_COMMENT_MODERATION'] # type: ignore