mirror of
https://github.com/discourse/discourse.git
synced 2025-02-13 14:55:06 +00:00
FIX: Allow mods/admins to search whispers
This commit is contained in:
parent
52ad4259d4
commit
68a92e6656
@ -393,7 +393,7 @@ class Search
|
|||||||
|
|
||||||
def posts_query(limit, opts=nil)
|
def posts_query(limit, opts=nil)
|
||||||
opts ||= {}
|
opts ||= {}
|
||||||
posts = Post.where(post_type: Post.types[:regular])
|
posts = Post.where(post_type: Topic.visible_post_types(@guardian.user))
|
||||||
.joins(:post_search_data, :topic)
|
.joins(:post_search_data, :topic)
|
||||||
.joins("LEFT JOIN categories ON categories.id = topics.category_id")
|
.joins("LEFT JOIN categories ON categories.id = topics.category_id")
|
||||||
.where("topics.deleted_at" => nil)
|
.where("topics.deleted_at" => nil)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user