fix minor can_see bug
parent
9e252f724c
commit
5dda70aa9e
|
@ -559,13 +559,13 @@ class LoggedOutUser():
|
||||||
content of a thing can be hidden from view
|
content of a thing can be hidden from view
|
||||||
'''
|
'''
|
||||||
if isinstance(other, (Submission, Comment)):
|
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 self and self.id == other.author_id: return True
|
||||||
if isinstance(other, Submission):
|
if isinstance(other, Submission):
|
||||||
if other.sub and not self.can_see(other.subr): return False
|
if other.sub and not self.can_see(other.subr): return False
|
||||||
else:
|
else:
|
||||||
if not other.parent_submission:
|
if not other.parent_submission:
|
||||||
if not self: return False
|
if not self: return False
|
||||||
|
if not self.can_see(other.author): return False
|
||||||
if not other.sentto: return True # handled by Notification
|
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 == 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
|
if other.sentto != user.id: return user.admin_level >= PERMS['POST_COMMENT_MODERATION'] # type: ignore
|
||||||
|
|
Loading…
Reference in New Issue