FIX: Show the deleted icon if the quote expands a deleted topic
This commit is contained in:
parent
48314d04f7
commit
89a1b34480
|
@ -662,9 +662,10 @@ class PostsController < ApplicationController
|
||||||
# Include deleted posts if the user is staff
|
# Include deleted posts if the user is staff
|
||||||
finder = finder.with_deleted if current_user.try(:staff?)
|
finder = finder.with_deleted if current_user.try(:staff?)
|
||||||
post = finder.first
|
post = finder.first
|
||||||
raise Discourse::NotFound unless post
|
|
||||||
# load deleted topic
|
# load deleted topic
|
||||||
post.topic = Topic.with_deleted.find(post.topic_id) if current_user.try(:staff?)
|
post.topic = Topic.with_deleted.find(post.topic_id) if current_user.try(:staff?)
|
||||||
|
raise Discourse::NotFound unless post.topic
|
||||||
|
|
||||||
guardian.ensure_can_see!(post)
|
guardian.ensure_can_see!(post)
|
||||||
post
|
post
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue