Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-24 15:09:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-24 15:09:01 +0300
commit2c2dd5e36c4ed5f09f488be288882d98f9124d12 (patch)
treead4c478bb1c588387a881b26a7db7c3237b9d4f3 /app/finders/contributed_projects_finder.rb
parent2ff184ad761fbfbe25a3d827c8f704349963a8d2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders/contributed_projects_finder.rb')
-rw-r--r--app/finders/contributed_projects_finder.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/finders/contributed_projects_finder.rb b/app/finders/contributed_projects_finder.rb
index f8c7f0c3167..a351d30229e 100644
--- a/app/finders/contributed_projects_finder.rb
+++ b/app/finders/contributed_projects_finder.rb
@@ -12,16 +12,14 @@ class ContributedProjectsFinder < UnionFinder
# visible by this user.
#
# Returns an ActiveRecord::Relation.
- # rubocop: disable CodeReuse/ActiveRecord
def execute(current_user = nil)
# Do not show contributed projects if the user profile is private.
return Project.none unless can_read_profile?(current_user)
segments = all_projects(current_user)
- find_union(segments, Project).includes(:namespace).order_id_desc
+ find_union(segments, Project).with_namespace.order_id_desc
end
- # rubocop: enable CodeReuse/ActiveRecord
private