mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:24:41 +08:00
FIX: users can see the raw email source of their own posts
This commit is contained in:
@ -180,8 +180,8 @@ module PostGuardian
|
||||
is_staff?
|
||||
end
|
||||
|
||||
def can_view_raw_email?
|
||||
is_staff?
|
||||
def can_view_raw_email?(post)
|
||||
post && (is_staff? || post.user_id == @user.id)
|
||||
end
|
||||
|
||||
def can_unhide?(post)
|
||||
|
Reference in New Issue
Block a user