Commit 55f69cbd authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ)

Merge branch 'kassio/do-not-add-missing-not-if-importer-user-is-mapped' into 'master'

Allow member mapping to map importer user on Group/Project Import

See merge request gitlab-org/gitlab!42882
parents 3897a9dd 4aef8458
---
title: Allow member mapping to map importer user on Group/Project Import
merge_request: 42882
author:
type: changed
......@@ -35,7 +35,7 @@ module Gitlab
end
def include?(old_user_id)
map.has_key?(old_user_id) && map[old_user_id] != default_user_id
map.has_key?(old_user_id)
end
private
......@@ -63,6 +63,8 @@ module Gitlab
end
def add_team_member(member, existing_user = nil)
return true if existing_user && @importable.members.exists?(user_id: existing_user.id)
member['user'] = existing_user
member_hash = member_hash(member)
......
......@@ -65,7 +65,7 @@ RSpec.shared_examples 'Notes user references' do
include_examples 'sets the note author to the mapped user'
include_examples 'adds original autor note'
include_examples 'does not add original autor note'
end
context 'and the note author exists in the target instance' do
......
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