Revert "SECURITY: Don't allow moderators to view the admins inbox"

Superseeded by d9a5280f5665d12bf46efd8cdcc6200da2cdedd8

This reverts commit 18d35bf64a.
This commit is contained in:
Guo Xiang Tan 2020-09-08 10:34:27 +08:00
parent 18d35bf64a
commit 0d3239bf21
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20
1 changed files with 1 additions and 2 deletions

View File

@ -540,8 +540,7 @@ class TopicQuery
SELECT group_id SELECT group_id
FROM group_users FROM group_users
WHERE user_id = #{user.id.to_i} WHERE user_id = #{user.id.to_i}
OR #{user.admin?} OR #{user.staff?}
OR (#{user.staff?} AND group_id <> #{Group::AUTO_GROUPS[:admins]})
) )
) )
AND group_id IN (SELECT id FROM groups WHERE name ilike ?) AND group_id IN (SELECT id FROM groups WHERE name ilike ?)