fix minor can_see bug

pull/20/head
justcool393 2022-11-19 05:47:53 -06:00
parent 9e252f724c
commit 5dda70aa9e
1 changed files with 1 additions and 1 deletions

View File

@ -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