Commit d3bdd3ba authored by Marin Jankovski's avatar Marin Jankovski

Do not filter out issues and merge requests related to user right away.

parent 5e017a45
......@@ -48,7 +48,7 @@ class IssuableFinder
else
[]
end
elsif current_user && params[:authorized_only].presence
elsif current_user && params[:authorized_only].presence && !current_user_related?
klass.of_projects(current_user.authorized_projects).references(:project)
else
klass.of_projects(ProjectsFinder.new.execute(current_user)).references(:project)
......@@ -142,4 +142,8 @@ class IssuableFinder
def project
Project.where(id: params[:project_id]).first if params[:project_id].present?
end
def current_user_related?
params[:scope] == 'created-by-me' || params[:scope] == 'authored' || params[:scope] == 'assigned-to-me'
end
end
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