From 4c53b3945c874933d6da517ade161d66f8f87b21 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 7 Aug 2019 16:01:51 +0200 Subject: [PATCH 1/2] Backport EE changes to the project import API EE added a single line to this file that can easily be backported to CE, but it appears this was overlooked. The method called is a noop in CE, so no additional changes are necessary. --- lib/api/project_import.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/api/project_import.rb b/lib/api/project_import.rb index 71891e43dcc..bb1b037c08f 100644 --- a/lib/api/project_import.rb +++ b/lib/api/project_import.rb @@ -59,6 +59,7 @@ module API } override_params = import_params.delete(:override_params) + filter_attributes_using_license!(override_params) if override_params project = ::Projects::GitlabProjectsImportService.new( current_user, project_params, override_params -- GitLab From a4e13a5966b45e500b69117d080e4794d92c7668 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 7 Aug 2019 16:24:17 +0200 Subject: [PATCH 2/2] Backport EE changes to ProjectSearchResults EE made some changes to the project_ids_relation method, but these were not backported to CE. --- lib/gitlab/project_search_results.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/gitlab/project_search_results.rb b/lib/gitlab/project_search_results.rb index 827f4f77f36..5e77d31760d 100644 --- a/lib/gitlab/project_search_results.rb +++ b/lib/gitlab/project_search_results.rb @@ -134,9 +134,11 @@ module Gitlab project.repository.commit(key) if Commit.valid_hash?(key) end + # rubocop: disable CodeReuse/ActiveRecord def project_ids_relation - project + Project.where(id: project).select(:id).reorder(nil) end + # rubocop: enabled CodeReuse/ActiveRecord def filter_milestones_by_project(milestones) return Milestone.none unless Ability.allowed?(@current_user, :read_milestone, @project) -- GitLab