From 46bef4fad06b909502be847e30f2c890ac2c2141 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 25 Sep 2015 11:43:04 -0400 Subject: [PATCH] FIX: Allow mods/admins to search whispers --- lib/search.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/search.rb b/lib/search.rb index 6811a98be54..e99e6036129 100644 --- a/lib/search.rb +++ b/lib/search.rb @@ -393,7 +393,7 @@ class Search def posts_query(limit, opts=nil) 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("LEFT JOIN categories ON categories.id = topics.category_id") .where("topics.deleted_at" => nil)