Commit 56b2f5e0 authored by James Lopez's avatar James Lopez

Merge branches 'feature/project-export-ui-experimental' and...

Merge branches 'feature/project-export-ui-experimental' and 'feature/project-import' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export-ui-experimental
parents becd9bfd 6782cd3c
...@@ -25,7 +25,6 @@ module Gitlab ...@@ -25,7 +25,6 @@ module Gitlab
def default_project_member def default_project_member
@default_project_member ||= @default_project_member ||=
begin begin
return @project.project_members.first.user.id unless @project.project_members.empty?
default_member = ProjectMember.new(default_project_member_hash) default_member = ProjectMember.new(default_project_member_hash)
default_member.save! default_member.save!
default_member.user.id default_member.user.id
......
...@@ -3,7 +3,6 @@ module Gitlab ...@@ -3,7 +3,6 @@ module Gitlab
module RelationFactory module RelationFactory
extend self extend self
OVERRIDES = { snippets: :project_snippets, OVERRIDES = { snippets: :project_snippets,
ci_commits: 'Ci::Commit', ci_commits: 'Ci::Commit',
statuses: 'commit_status', statuses: 'commit_status',
...@@ -39,11 +38,11 @@ module Gitlab ...@@ -39,11 +38,11 @@ module Gitlab
def update_missing_author(relation_hash, members_map, user_admin) def update_missing_author(relation_hash, members_map, user_admin)
old_author_id = relation_hash['author_id'] old_author_id = relation_hash['author_id']
# Users with admin access have access to mapping of users # Users with admin access can map users
if user_admin if user_admin
relation_hash['author_id'] = members_map.default_project_member
else
relation_hash['author_id'] = members_map.map[old_author_id] relation_hash['author_id'] = members_map.map[old_author_id]
else
relation_hash['author_id'] = members_map.default_project_member
end end
author = relation_hash.delete('author') author = relation_hash.delete('author')
......
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