mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
SECURITY: dissalow mods from seeing PMs
This commit is contained in:
@@ -100,7 +100,10 @@ module PostGuardain
|
||||
end
|
||||
|
||||
def can_see_post?(post)
|
||||
post.present? && (is_staff? || (!post.deleted_at.present? && can_see_topic?(post.topic)))
|
||||
post.present? &&
|
||||
(is_admin? ||
|
||||
((is_moderator? || !post.deleted_at.present?) &&
|
||||
can_see_topic?(post.topic)))
|
||||
end
|
||||
|
||||
def can_see_post_revision?(post_revision)
|
||||
|
||||
Reference in New Issue
Block a user