From 0d3239bf212d06b47bee524ab28f31d8baf15b3c Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 8 Sep 2020 10:34:27 +0800 Subject: [PATCH] Revert "SECURITY: Don't allow moderators to view the admins inbox" Superseeded by d9a5280f5665d12bf46efd8cdcc6200da2cdedd8 This reverts commit 18d35bf64aff8931ee1072779324ead5c88f00c2. --- lib/topic_query.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/topic_query.rb b/lib/topic_query.rb index fcffb422bef..ec6133ca747 100644 --- a/lib/topic_query.rb +++ b/lib/topic_query.rb @@ -540,8 +540,7 @@ class TopicQuery SELECT group_id FROM group_users WHERE user_id = #{user.id.to_i} - OR #{user.admin?} - OR (#{user.staff?} AND group_id <> #{Group::AUTO_GROUPS[:admins]}) + OR #{user.staff?} ) ) AND group_id IN (SELECT id FROM groups WHERE name ilike ?)