Disallow access to raw email for non-staff users (#17569)
This commit is contained in:
parent
dee8a1db20
commit
56555a0231
|
@ -127,8 +127,7 @@ export default function transformPost(
|
|||
postType === postTypes.small_action || post.action_code === "split_topic";
|
||||
postAtts.canBookmark = !!currentUser;
|
||||
postAtts.canManage = currentUser && currentUser.get("canManageTopic");
|
||||
postAtts.canViewRawEmail =
|
||||
currentUser && (currentUser.id === post.user_id || currentUser.staff);
|
||||
postAtts.canViewRawEmail = currentUser && currentUser.staff;
|
||||
postAtts.canArchiveTopic = !!details.can_archive_topic;
|
||||
postAtts.canCloseTopic = !!details.can_close_topic;
|
||||
postAtts.canSplitMergeTopic = !!details.can_split_merge_topic;
|
||||
|
|
|
@ -296,7 +296,7 @@ module PostGuardian
|
|||
end
|
||||
|
||||
def can_view_raw_email?(post)
|
||||
post && (is_staff? || post.user_id == @user.id)
|
||||
post && is_staff?
|
||||
end
|
||||
|
||||
def can_unhide?(post)
|
||||
|
|
Loading…
Reference in New Issue