mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: users can see the raw email source of their own posts
This commit is contained in:
@ -31,8 +31,8 @@ class PostsController < ApplicationController
|
||||
end
|
||||
|
||||
def raw_email
|
||||
guardian.ensure_can_view_raw_email!
|
||||
post = Post.find(params[:id].to_i)
|
||||
guardian.ensure_can_view_raw_email!(post)
|
||||
render json: {raw_email: post.raw_email}
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user