Commit c09539cc authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Improve authorized projects preloading for normal (non-admin) visible issues query

parent d4874fb9
......@@ -26,7 +26,8 @@ module IssueLinks
def issues
authorized_issues = Issue
.not_restricted_by_confidentiality(@current_user)
.where(project_id: @current_user.authorized_projects.select(:id))
.merge(@current_user.authorized_projects)
.join_project
.reorder(nil)
Issue.from("(SELECT issues.*, issue_links.id AS issue_links_id
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment