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>2022-09-15 03:14:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-15 03:14:10 +0300
commit119c999cf1f1bb51d4324e3c4847435347eb32cf (patch)
tree83f92f606877455177bb57c7d2ad31704d10027b /app/services/bulk_imports
parent5594a6badf033359b84c2e9822f145c66b0dce8f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/bulk_imports')
-rw-r--r--app/services/bulk_imports/relation_export_service.rb2
-rw-r--r--app/services/bulk_imports/tree_export_service.rb8
2 files changed, 6 insertions, 4 deletions
diff --git a/app/services/bulk_imports/relation_export_service.rb b/app/services/bulk_imports/relation_export_service.rb
index c43f0d8cb4f..b1efa881180 100644
--- a/app/services/bulk_imports/relation_export_service.rb
+++ b/app/services/bulk_imports/relation_export_service.rb
@@ -65,7 +65,7 @@ module BulkImports
def export_service
@export_service ||= if config.tree_relation?(relation) || config.self_relation?(relation)
- TreeExportService.new(portable, config.export_path, relation)
+ TreeExportService.new(portable, config.export_path, relation, user)
elsif config.file_relation?(relation)
FileExportService.new(portable, config.export_path, relation)
else
diff --git a/app/services/bulk_imports/tree_export_service.rb b/app/services/bulk_imports/tree_export_service.rb
index 8e885e590d1..b6f094da558 100644
--- a/app/services/bulk_imports/tree_export_service.rb
+++ b/app/services/bulk_imports/tree_export_service.rb
@@ -2,11 +2,12 @@
module BulkImports
class TreeExportService
- def initialize(portable, export_path, relation)
+ def initialize(portable, export_path, relation, user)
@portable = portable
@export_path = export_path
@relation = relation
@config = FileTransfer.config_for(portable)
+ @user = user
end
def execute
@@ -27,7 +28,7 @@ module BulkImports
private
- attr_reader :export_path, :portable, :relation, :config
+ attr_reader :export_path, :portable, :relation, :config, :user
# rubocop: disable CodeReuse/Serializer
def serializer
@@ -35,7 +36,8 @@ module BulkImports
portable,
config.portable_tree,
json_writer,
- exportable_path: ''
+ exportable_path: '',
+ current_user: user
)
end
# rubocop: enable CodeReuse/Serializer