diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-24 15:09:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-24 15:09:01 +0300 |
commit | 2c2dd5e36c4ed5f09f488be288882d98f9124d12 (patch) | |
tree | ad4c478bb1c588387a881b26a7db7c3237b9d4f3 /app/finders | |
parent | 2ff184ad761fbfbe25a3d827c8f704349963a8d2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/contributed_projects_finder.rb | 4 | ||||
-rw-r--r-- | app/finders/personal_projects_finder.rb | 4 |
2 files changed, 2 insertions, 6 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 diff --git a/app/finders/personal_projects_finder.rb b/app/finders/personal_projects_finder.rb index 20f5b221a89..e7094d73905 100644 --- a/app/finders/personal_projects_finder.rb +++ b/app/finders/personal_projects_finder.rb @@ -17,15 +17,13 @@ class PersonalProjectsFinder < UnionFinder # min_access_level: integer # # Returns an ActiveRecord::Relation. - # rubocop: disable CodeReuse/ActiveRecord def execute(current_user = nil) return Project.none unless can?(current_user, :read_user_profile, @user) segments = all_projects(current_user) - find_union(segments, Project).includes(:namespace).order_updated_desc + find_union(segments, Project).with_namespace.order_updated_desc end - # rubocop: enable CodeReuse/ActiveRecord private |