Skip to content

Commit

Permalink
FIX: Unknown /posts/id.json should 404
Browse files Browse the repository at this point in the history
  • Loading branch information
riking committed Sep 11, 2014
1 parent 5cb7c8e commit b626997
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/posts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ def find_post_using(finder)
# Include deleted posts if the user is staff
finder = finder.with_deleted if current_user.try(:staff?)
post = finder.first
raise Discourse::NotFound unless post
# load deleted topic
post.topic = Topic.with_deleted.find(post.topic_id) if current_user.try(:staff?)
guardian.ensure_can_see!(post)
Expand Down

0 comments on commit b626997

Please sign in to comment.