Fix a bug searching private projects with ES as an admin or auditor
What does this MR do?
Fixes an elasticsearch query so private projects are included in search results when you're an admin or auditor.
Are there points in the code the reviewer needs to double check?
Searching as admin or auditor was introduced fairly recently: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1578 - it seems I just failed to consider this case.
Queries for non-admin users are completely unaffected so there shouldn't be any security impact to this MR.
Why was this MR needed?
Broken search functionality
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary [ ] Documentation created/updated[ ] API support added- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #2338 (closed)
Edited by Nick Thomas