Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
dd86c91c
Commit
dd86c91c
authored
May 19, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed small issue mapping members
parent
38b92fe8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
lib/gitlab/import_export/members_mapper.rb
lib/gitlab/import_export/members_mapper.rb
+0
-1
lib/gitlab/import_export/relation_factory.rb
lib/gitlab/import_export/relation_factory.rb
+3
-3
No files found.
lib/gitlab/import_export/members_mapper.rb
View file @
dd86c91c
...
@@ -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
...
...
lib/gitlab/import_export/relation_factory.rb
View file @
dd86c91c
...
@@ -39,11 +39,11 @@ module Gitlab
...
@@ -39,11 +39,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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment