Commit 616e66ce authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'group-import-with-json-or-ndjson' into 'master'

Group import with json or ndjson

See merge request gitlab-org/gitlab!30055
parents 150e4d45 fccdf43f
......@@ -36,7 +36,7 @@ module Groups
def restorer
@restorer ||=
if ::Feature.enabled?(:group_import_export_ndjson, @group&.parent)
if ndjson?
Gitlab::ImportExport::Group::TreeRestorer.new(
user: @current_user,
shared: @shared,
......@@ -52,6 +52,11 @@ module Groups
end
end
def ndjson?
::Feature.enabled?(:group_import_export_ndjson, @group&.parent) &&
File.exist?(File.join(@shared.export_path, 'tree/groups/_all.ndjson'))
end
def remove_import_file
upload = @group.import_export_upload
......
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