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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c9375914
Commit
c9375914
authored
Jul 22, 2021
by
George Koltsov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Import/Export to use public email when mapping users
Changelog: security EE: true
parent
7f1b6ac9
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
114 additions
and
80 deletions
+114
-80
doc/development/import_export.md
doc/development/import_export.md
+1
-1
doc/user/project/settings/import_export.md
doc/user/project/settings/import_export.md
+1
-1
ee/spec/fixtures/lib/gitlab/import_export/complex/project.json
...ec/fixtures/lib/gitlab/import_export/complex/project.json
+1
-1
ee/spec/fixtures/lib/gitlab/import_export/group_exports/light/group.json
...s/lib/gitlab/import_export/group_exports/light/group.json
+2
-2
ee/spec/fixtures/lib/gitlab/import_export/group_exports/light/tree/groups/761/members.ndjson
...export/group_exports/light/tree/groups/761/members.ndjson
+1
-1
lib/gitlab/import_export/group/import_export.yml
lib/gitlab/import_export/group/import_export.yml
+1
-1
lib/gitlab/import_export/group/legacy_import_export.yml
lib/gitlab/import_export/group/legacy_import_export.yml
+1
-1
lib/gitlab/import_export/members_mapper.rb
lib/gitlab/import_export/members_mapper.rb
+4
-3
lib/gitlab/import_export/project/import_export.yml
lib/gitlab/import_export/project/import_export.yml
+1
-1
spec/fixtures/group.json
spec/fixtures/group.json
+1
-1
spec/fixtures/lib/gitlab/import_export/complex/project.json
spec/fixtures/lib/gitlab/import_export/complex/project.json
+4
-4
spec/fixtures/lib/gitlab/import_export/complex/tree/project/project_members.ndjson
...import_export/complex/tree/project/project_members.ndjson
+4
-4
spec/fixtures/lib/gitlab/import_export/designs/project.json
spec/fixtures/lib/gitlab/import_export/designs/project.json
+2
-2
spec/fixtures/lib/gitlab/import_export/group_exports/complex/group.json
...lib/gitlab/import_export/group_exports/complex/group.json
+18
-18
spec/fixtures/lib/gitlab/import_export/group_exports/complex/tree/groups/4351/members.ndjson
...ort/group_exports/complex/tree/groups/4351/members.ndjson
+6
-6
spec/fixtures/lib/gitlab/import_export/group_exports/complex/tree/groups/4352/members.ndjson
...ort/group_exports/complex/tree/groups/4352/members.ndjson
+6
-6
spec/fixtures/lib/gitlab/import_export/group_exports/complex/tree/groups/4353/members.ndjson
...ort/group_exports/complex/tree/groups/4353/members.ndjson
+6
-6
spec/fixtures/lib/gitlab/import_export/group_exports/no_children/group.json
...gitlab/import_export/group_exports/no_children/group.json
+6
-6
spec/fixtures/lib/gitlab/import_export/group_exports/no_children/tree/groups/4353/members.ndjson
...group_exports/no_children/tree/groups/4353/members.ndjson
+6
-6
spec/lib/gitlab/import_export/base/relation_factory_spec.rb
spec/lib/gitlab/import_export/base/relation_factory_spec.rb
+1
-1
spec/lib/gitlab/import_export/group/legacy_tree_saver_spec.rb
.../lib/gitlab/import_export/group/legacy_tree_saver_spec.rb
+2
-1
spec/lib/gitlab/import_export/members_mapper_spec.rb
spec/lib/gitlab/import_export/members_mapper_spec.rb
+34
-3
spec/lib/gitlab/import_export/project/relation_factory_spec.rb
...lib/gitlab/import_export/project/relation_factory_spec.rb
+2
-2
spec/lib/gitlab/import_export/project/tree_saver_spec.rb
spec/lib/gitlab/import_export/project/tree_saver_spec.rb
+2
-1
spec/support/shared_examples/lib/gitlab/import_export/relation_factory_shared_examples.rb
.../gitlab/import_export/relation_factory_shared_examples.rb
+1
-1
No files found.
doc/development/import_export.md
View file @
c9375914
...
@@ -259,7 +259,7 @@ Only include the following attributes for the models specified:
...
@@ -259,7 +259,7 @@ Only include the following attributes for the models specified:
included_attributes
:
included_attributes
:
user
:
user
:
-
:id
-
:id
-
:email
-
:
public_
email
# ...
# ...
```
```
...
...
doc/user/project/settings/import_export.md
View file @
c9375914
...
@@ -44,7 +44,7 @@ Note the following:
...
@@ -44,7 +44,7 @@ Note the following:
-
Group members are exported as project members, as long as the user has
-
Group members are exported as project members, as long as the user has
a maintainer or administrator role in the group where the exported project lives.
a maintainer or administrator role in the group where the exported project lives.
-
Project members with the
[
Owner role
](
../../permissions.md
)
are imported as Maintainers.
-
Project members with the
[
Owner role
](
../../permissions.md
)
are imported as Maintainers.
-
Imported users can be mapped by their p
rimary
email on self-managed instances, if an administrative user (not an owner) does the import.
-
Imported users can be mapped by their p
ublic
email on self-managed instances, if an administrative user (not an owner) does the import.
Additionally, the user must be an existing member of the namespace, or the user can be added as a
Additionally, the user must be an existing member of the namespace, or the user can be added as a
member of the project for contributions to be mapped.
member of the project for contributions to be mapped.
Otherwise, a supplementary comment is left to mention that the original author and
Otherwise, a supplementary comment is left to mention that the original author and
...
...
ee/spec/fixtures/lib/gitlab/import_export/complex/project.json
View file @
c9375914
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
"requested_at"
:
null
,
"requested_at"
:
null
,
"user"
:
{
"user"
:
{
"id"
:
16
,
"id"
:
16
,
"email"
:
"bernard_willms@gitlabexample.com"
,
"
public_
email"
:
"bernard_willms@gitlabexample.com"
,
"username"
:
"bernard_willms"
"username"
:
"bernard_willms"
}
}
}
}
...
...
ee/spec/fixtures/lib/gitlab/import_export/group_exports/light/group.json
View file @
c9375914
...
@@ -204,7 +204,7 @@
...
@@ -204,7 +204,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
42
,
"id"
:
42
,
"email"
:
"moriah@collinsmurphy.com"
,
"
public_
email"
:
"moriah@collinsmurphy.com"
,
"username"
:
"reported_user_15"
"username"
:
"reported_user_15"
}
}
}
}
...
@@ -433,7 +433,7 @@
...
@@ -433,7 +433,7 @@
},
},
"author"
:
{
"author"
:
{
"id"
:
1
,
"id"
:
1
,
"email"
:
""
,
"
public_
email"
:
""
,
"created_at"
:
"2021-04-14T14:42:15.926Z"
,
"created_at"
:
"2021-04-14T14:42:15.926Z"
,
"updated_at"
:
"2021-06-08T16:32:26.109Z"
,
"updated_at"
:
"2021-06-08T16:32:26.109Z"
,
"name"
:
"Administrator"
"name"
:
"Administrator"
...
...
ee/spec/fixtures/lib/gitlab/import_export/group_exports/light/tree/groups/761/members.ndjson
View file @
c9375914
{"id":13766,"access_level":30,"source_id":4351,"source_type":"Namespace","user_id":42,"notification_level":3,"created_at":"2019-11-20T17:04:36.184Z","updated_at":"2019-11-20T17:04:36.184Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":42,"email":"moriah@collinsmurphy.com","username":"reported_user_15"}}
{"id":13766,"access_level":30,"source_id":4351,"source_type":"Namespace","user_id":42,"notification_level":3,"created_at":"2019-11-20T17:04:36.184Z","updated_at":"2019-11-20T17:04:36.184Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":42,"
public_
email":"moriah@collinsmurphy.com","username":"reported_user_15"}}
lib/gitlab/import_export/group/import_export.yml
View file @
c9375914
...
@@ -20,7 +20,7 @@ tree:
...
@@ -20,7 +20,7 @@ tree:
included_attributes
:
included_attributes
:
user
:
user
:
-
:id
-
:id
-
:email
-
:
public_
email
-
:username
-
:username
author
:
author
:
-
:name
-
:name
...
...
lib/gitlab/import_export/group/legacy_import_export.yml
View file @
c9375914
...
@@ -20,7 +20,7 @@ tree:
...
@@ -20,7 +20,7 @@ tree:
included_attributes
:
included_attributes
:
user
:
user
:
-
:id
-
:id
-
:email
-
:
public_
email
-
:username
-
:username
author
:
author
:
-
:name
-
:name
...
...
lib/gitlab/import_export/members_mapper.rb
View file @
c9375914
...
@@ -19,7 +19,8 @@ module Gitlab
...
@@ -19,7 +19,8 @@ module Gitlab
@exported_members
.
inject
(
missing_keys_tracking_hash
)
do
|
hash
,
member
|
@exported_members
.
inject
(
missing_keys_tracking_hash
)
do
|
hash
,
member
|
if
member
[
'user'
]
if
member
[
'user'
]
old_user_id
=
member
[
'user'
][
'id'
]
old_user_id
=
member
[
'user'
][
'id'
]
existing_user
=
User
.
find_by
(
find_user_query
(
member
))
old_user_email
=
member
.
dig
(
'user'
,
'public_email'
)
||
member
.
dig
(
'user'
,
'email'
)
existing_user
=
User
.
find_by
(
find_user_query
(
old_user_email
))
if
old_user_email
hash
[
old_user_id
]
=
existing_user
.
id
if
existing_user
&&
add_team_member
(
member
,
existing_user
)
hash
[
old_user_id
]
=
existing_user
.
id
if
existing_user
&&
add_team_member
(
member
,
existing_user
)
else
else
add_team_member
(
member
)
add_team_member
(
member
)
...
@@ -94,8 +95,8 @@ module Gitlab
...
@@ -94,8 +95,8 @@ module Gitlab
relation_class:
relation_class
)
relation_class:
relation_class
)
end
end
def
find_user_query
(
member
)
def
find_user_query
(
email
)
user_arel
[
:email
].
eq
(
member
[
'user'
][
'email'
]
)
user_arel
[
:email
].
eq
(
email
)
end
end
def
user_arel
def
user_arel
...
...
lib/gitlab/import_export/project/import_export.yml
View file @
c9375914
...
@@ -114,7 +114,7 @@ tree:
...
@@ -114,7 +114,7 @@ tree:
included_attributes
:
included_attributes
:
user
:
user
:
-
:id
-
:id
-
:email
-
:
public_
email
-
:username
-
:username
author
:
author
:
-
:name
-
:name
...
...
spec/fixtures/group.json
View file @
c9375914
This diff is collapsed.
Click to expand it.
spec/fixtures/lib/gitlab/import_export/complex/project.json
View file @
c9375914
...
@@ -2398,7 +2398,7 @@
...
@@ -2398,7 +2398,7 @@
"requested_at"
:
null
,
"requested_at"
:
null
,
"user"
:
{
"user"
:
{
"id"
:
16
,
"id"
:
16
,
"email"
:
"bernard_willms@gitlabexample.com"
,
"
public_
email"
:
"bernard_willms@gitlabexample.com"
,
"username"
:
"bernard_willms"
"username"
:
"bernard_willms"
}
}
},
},
...
@@ -2418,7 +2418,7 @@
...
@@ -2418,7 +2418,7 @@
"requested_at"
:
null
,
"requested_at"
:
null
,
"user"
:
{
"user"
:
{
"id"
:
6
,
"id"
:
6
,
"email"
:
"saul_will@gitlabexample.com"
,
"
public_
email"
:
"saul_will@gitlabexample.com"
,
"username"
:
"saul_will"
"username"
:
"saul_will"
}
}
},
},
...
@@ -2438,7 +2438,7 @@
...
@@ -2438,7 +2438,7 @@
"requested_at"
:
null
,
"requested_at"
:
null
,
"user"
:
{
"user"
:
{
"id"
:
15
,
"id"
:
15
,
"email"
:
"breanna_sanford@wolf.com"
,
"
public_
email"
:
"breanna_sanford@wolf.com"
,
"username"
:
"emmet.schamberger"
"username"
:
"emmet.schamberger"
}
}
},
},
...
@@ -2458,7 +2458,7 @@
...
@@ -2458,7 +2458,7 @@
"requested_at"
:
null
,
"requested_at"
:
null
,
"user"
:
{
"user"
:
{
"id"
:
26
,
"id"
:
26
,
"email"
:
"user4@example.com"
,
"
public_
email"
:
"user4@example.com"
,
"username"
:
"user4"
"username"
:
"user4"
}
}
}
}
...
...
spec/fixtures/lib/gitlab/import_export/complex/tree/project/project_members.ndjson
View file @
c9375914
{"id":36,"access_level":40,"source_id":5,"source_type":"Project","user_id":16,"notification_level":3,"created_at":"2016-06-14T15:02:03.834Z","updated_at":"2016-06-14T15:02:03.834Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"user":{"id":16,"email":"bernard_willms@gitlabexample.com","username":"bernard_willms"}}
{"id":36,"access_level":40,"source_id":5,"source_type":"Project","user_id":16,"notification_level":3,"created_at":"2016-06-14T15:02:03.834Z","updated_at":"2016-06-14T15:02:03.834Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"user":{"id":16,"
public_
email":"bernard_willms@gitlabexample.com","username":"bernard_willms"}}
{"id":35,"access_level":10,"source_id":5,"source_type":"Project","user_id":6,"notification_level":3,"created_at":"2016-06-14T15:02:03.811Z","updated_at":"2016-06-14T15:02:03.811Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"user":{"id":6,"email":"saul_will@gitlabexample.com","username":"saul_will"}}
{"id":35,"access_level":10,"source_id":5,"source_type":"Project","user_id":6,"notification_level":3,"created_at":"2016-06-14T15:02:03.811Z","updated_at":"2016-06-14T15:02:03.811Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"user":{"id":6,"
public_
email":"saul_will@gitlabexample.com","username":"saul_will"}}
{"id":34,"access_level":20,"source_id":5,"source_type":"Project","user_id":15,"notification_level":3,"created_at":"2016-06-14T15:02:03.776Z","updated_at":"2016-06-14T15:02:03.776Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"user":{"id":15,"email":"breanna_sanford@wolf.com","username":"emmet.schamberger"}}
{"id":34,"access_level":20,"source_id":5,"source_type":"Project","user_id":15,"notification_level":3,"created_at":"2016-06-14T15:02:03.776Z","updated_at":"2016-06-14T15:02:03.776Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"user":{"id":15,"
public_
email":"breanna_sanford@wolf.com","username":"emmet.schamberger"}}
{"id":33,"access_level":20,"source_id":5,"source_type":"Project","user_id":26,"notification_level":3,"created_at":"2016-06-14T15:02:03.742Z","updated_at":"2016-06-14T15:02:03.742Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"user":{"id":26,"email":"user4@example.com","username":"user4"}}
{"id":33,"access_level":20,"source_id":5,"source_type":"Project","user_id":26,"notification_level":3,"created_at":"2016-06-14T15:02:03.742Z","updated_at":"2016-06-14T15:02:03.742Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"user":{"id":26,"
public_
email":"user4@example.com","username":"user4"}}
spec/fixtures/lib/gitlab/import_export/designs/project.json
View file @
c9375914
...
@@ -425,7 +425,7 @@
...
@@ -425,7 +425,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:{
"user"
:{
"id"
:
1
,
"id"
:
1
,
"email"
:
"admin@example.com"
,
"
public_
email"
:
"admin@example.com"
,
"username"
:
"root"
"username"
:
"root"
}
}
},
},
...
@@ -448,7 +448,7 @@
...
@@ -448,7 +448,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:{
"user"
:{
"id"
:
2
,
"id"
:
2
,
"email"
:
"user_2@gitlabexample.com"
,
"
public_
email"
:
"user_2@gitlabexample.com"
,
"username"
:
"user_2"
"username"
:
"user_2"
}
}
}
}
...
...
spec/fixtures/lib/gitlab/import_export/group_exports/complex/group.json
View file @
c9375914
...
@@ -377,7 +377,7 @@
...
@@ -377,7 +377,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
42
,
"id"
:
42
,
"email"
:
"moriah@collinsmurphy.com"
,
"
public_
email"
:
"moriah@collinsmurphy.com"
,
"username"
:
"reported_user_15"
"username"
:
"reported_user_15"
}
}
},
},
...
@@ -400,7 +400,7 @@
...
@@ -400,7 +400,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
271
,
"id"
:
271
,
"email"
:
"garret@connellystark.ca"
,
"
public_
email"
:
"garret@connellystark.ca"
,
"username"
:
"charlesetta"
"username"
:
"charlesetta"
}
}
},
},
...
@@ -423,7 +423,7 @@
...
@@ -423,7 +423,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
206
,
"id"
:
206
,
"email"
:
"gwendolyn_robel@gitlabexample.com"
,
"
public_
email"
:
"gwendolyn_robel@gitlabexample.com"
,
"username"
:
"gwendolyn_robel"
"username"
:
"gwendolyn_robel"
}
}
},
},
...
@@ -446,7 +446,7 @@
...
@@ -446,7 +446,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
39
,
"id"
:
39
,
"email"
:
"alexis_berge@kerlukeklein.us"
,
"
public_
email"
:
"alexis_berge@kerlukeklein.us"
,
"username"
:
"reported_user_12"
"username"
:
"reported_user_12"
}
}
},
},
...
@@ -469,7 +469,7 @@
...
@@ -469,7 +469,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
1624
,
"id"
:
1624
,
"email"
:
"adriene.mcclure@gitlabexample.com"
,
"
public_
email"
:
"adriene.mcclure@gitlabexample.com"
,
"username"
:
"adriene.mcclure"
"username"
:
"adriene.mcclure"
}
}
},
},
...
@@ -492,7 +492,7 @@
...
@@ -492,7 +492,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
1
,
"id"
:
1
,
"email"
:
"admin@example.com"
,
"
public_
email"
:
"admin@example.com"
,
"username"
:
"root"
"username"
:
"root"
}
}
}
}
...
@@ -1338,7 +1338,7 @@
...
@@ -1338,7 +1338,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
1087
,
"id"
:
1087
,
"email"
:
"paige@blanda.info"
,
"
public_
email"
:
"paige@blanda.info"
,
"username"
:
"billi_auer"
"username"
:
"billi_auer"
}
}
},
},
...
@@ -1361,7 +1361,7 @@
...
@@ -1361,7 +1361,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
171
,
"id"
:
171
,
"email"
:
"heidi@bosco.co.uk"
,
"
public_
email"
:
"heidi@bosco.co.uk"
,
"username"
:
"gerard.cruickshank"
"username"
:
"gerard.cruickshank"
}
}
},
},
...
@@ -1384,7 +1384,7 @@
...
@@ -1384,7 +1384,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
1157
,
"id"
:
1157
,
"email"
:
"larisa.bruen@carroll.biz"
,
"
public_
email"
:
"larisa.bruen@carroll.biz"
,
"username"
:
"milagros.reynolds"
"username"
:
"milagros.reynolds"
}
}
},
},
...
@@ -1407,7 +1407,7 @@
...
@@ -1407,7 +1407,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
14
,
"id"
:
14
,
"email"
:
"madlyn_kovacek@wiza.ca"
,
"
public_
email"
:
"madlyn_kovacek@wiza.ca"
,
"username"
:
"monique.gusikowski"
"username"
:
"monique.gusikowski"
}
}
},
},
...
@@ -1430,7 +1430,7 @@
...
@@ -1430,7 +1430,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
1167
,
"id"
:
1167
,
"email"
:
"mirella@koepp.ca"
,
"
public_
email"
:
"mirella@koepp.ca"
,
"username"
:
"eileen"
"username"
:
"eileen"
}
}
},
},
...
@@ -1453,7 +1453,7 @@
...
@@ -1453,7 +1453,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
1
,
"id"
:
1
,
"email"
:
"admin@example.com"
,
"
public_
email"
:
"admin@example.com"
,
"username"
:
"root"
"username"
:
"root"
}
}
}
}
...
@@ -1909,7 +1909,7 @@
...
@@ -1909,7 +1909,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
1533
,
"id"
:
1533
,
"email"
:
"jose@cassin.ca"
,
"
public_
email"
:
"jose@cassin.ca"
,
"username"
:
"buster"
"username"
:
"buster"
}
}
},
},
...
@@ -1932,7 +1932,7 @@
...
@@ -1932,7 +1932,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
1586
,
"id"
:
1586
,
"email"
:
"carie@gleichner.us"
,
"
public_
email"
:
"carie@gleichner.us"
,
"username"
:
"dominque"
"username"
:
"dominque"
}
}
},
},
...
@@ -1955,7 +1955,7 @@
...
@@ -1955,7 +1955,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
190
,
"id"
:
190
,
"email"
:
"delois@funk.biz"
,
"
public_
email"
:
"delois@funk.biz"
,
"username"
:
"kittie"
"username"
:
"kittie"
}
}
},
},
...
@@ -1978,7 +1978,7 @@
...
@@ -1978,7 +1978,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
254
,
"id"
:
254
,
"email"
:
"tyra.lowe@whitemckenzie.co.uk"
,
"
public_
email"
:
"tyra.lowe@whitemckenzie.co.uk"
,
"username"
:
"kassie"
"username"
:
"kassie"
}
}
},
},
...
@@ -2001,7 +2001,7 @@
...
@@ -2001,7 +2001,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
503
,
"id"
:
503
,
"email"
:
"tyesha.brakus@bruen.ca"
,
"
public_
email"
:
"tyesha.brakus@bruen.ca"
,
"username"
:
"charise"
"username"
:
"charise"
}
}
},
},
...
@@ -2024,7 +2024,7 @@
...
@@ -2024,7 +2024,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
1
,
"id"
:
1
,
"email"
:
"admin@example.com"
,
"
public_
email"
:
"admin@example.com"
,
"username"
:
"root"
"username"
:
"root"
}
}
}
}
...
...
spec/fixtures/lib/gitlab/import_export/group_exports/complex/tree/groups/4351/members.ndjson
View file @
c9375914
{"id":13766,"access_level":30,"source_id":4351,"source_type":"Namespace","user_id":42,"notification_level":3,"created_at":"2019-11-20T17:04:36.184Z","updated_at":"2019-11-20T17:04:36.184Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":42,"email":"moriah@collinsmurphy.com","username":"reported_user_15"}}
{"id":13766,"access_level":30,"source_id":4351,"source_type":"Namespace","user_id":42,"notification_level":3,"created_at":"2019-11-20T17:04:36.184Z","updated_at":"2019-11-20T17:04:36.184Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":42,"
public_
email":"moriah@collinsmurphy.com","username":"reported_user_15"}}
{"id":13765,"access_level":40,"source_id":4351,"source_type":"Namespace","user_id":271,"notification_level":3,"created_at":"2019-11-20T17:04:36.044Z","updated_at":"2019-11-20T17:04:36.044Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":271,"email":"garret@connellystark.ca","username":"charlesetta"}}
{"id":13765,"access_level":40,"source_id":4351,"source_type":"Namespace","user_id":271,"notification_level":3,"created_at":"2019-11-20T17:04:36.044Z","updated_at":"2019-11-20T17:04:36.044Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":271,"
public_
email":"garret@connellystark.ca","username":"charlesetta"}}
{"id":13764,"access_level":30,"source_id":4351,"source_type":"Namespace","user_id":206,"notification_level":3,"created_at":"2019-11-20T17:04:35.840Z","updated_at":"2019-11-20T17:04:35.840Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":206,"email":"gwendolyn_robel@gitlabexample.com","username":"gwendolyn_robel"}}
{"id":13764,"access_level":30,"source_id":4351,"source_type":"Namespace","user_id":206,"notification_level":3,"created_at":"2019-11-20T17:04:35.840Z","updated_at":"2019-11-20T17:04:35.840Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":206,"
public_
email":"gwendolyn_robel@gitlabexample.com","username":"gwendolyn_robel"}}
{"id":13763,"access_level":10,"source_id":4351,"source_type":"Namespace","user_id":39,"notification_level":3,"created_at":"2019-11-20T17:04:35.704Z","updated_at":"2019-11-20T17:04:35.704Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":39,"email":"alexis_berge@kerlukeklein.us","username":"reported_user_12"}}
{"id":13763,"access_level":10,"source_id":4351,"source_type":"Namespace","user_id":39,"notification_level":3,"created_at":"2019-11-20T17:04:35.704Z","updated_at":"2019-11-20T17:04:35.704Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":39,"
public_
email":"alexis_berge@kerlukeklein.us","username":"reported_user_12"}}
{"id":13762,"access_level":20,"source_id":4351,"source_type":"Namespace","user_id":1624,"notification_level":3,"created_at":"2019-11-20T17:04:35.566Z","updated_at":"2019-11-20T17:04:35.566Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1624,"email":"adriene.mcclure@gitlabexample.com","username":"adriene.mcclure"}}
{"id":13762,"access_level":20,"source_id":4351,"source_type":"Namespace","user_id":1624,"notification_level":3,"created_at":"2019-11-20T17:04:35.566Z","updated_at":"2019-11-20T17:04:35.566Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1624,"
public_
email":"adriene.mcclure@gitlabexample.com","username":"adriene.mcclure"}}
{"id":12920,"access_level":50,"source_id":4351,"source_type":"Namespace","user_id":1,"notification_level":3,"created_at":"2019-11-20T17:01:53.505Z","updated_at":"2019-11-20T17:01:53.505Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1,"email":"admin@example.com","username":"root"}}
{"id":12920,"access_level":50,"source_id":4351,"source_type":"Namespace","user_id":1,"notification_level":3,"created_at":"2019-11-20T17:01:53.505Z","updated_at":"2019-11-20T17:01:53.505Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1,"
public_
email":"admin@example.com","username":"root"}}
spec/fixtures/lib/gitlab/import_export/group_exports/complex/tree/groups/4352/members.ndjson
View file @
c9375914
{"id":13771,"access_level":30,"source_id":4352,"source_type":"Namespace","user_id":1087,"notification_level":3,"created_at":"2019-11-20T17:04:36.968Z","updated_at":"2019-11-20T17:04:36.968Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1087,"email":"paige@blanda.info","username":"billi_auer"}}
{"id":13771,"access_level":30,"source_id":4352,"source_type":"Namespace","user_id":1087,"notification_level":3,"created_at":"2019-11-20T17:04:36.968Z","updated_at":"2019-11-20T17:04:36.968Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1087,"
public_
email":"paige@blanda.info","username":"billi_auer"}}
{"id":13770,"access_level":20,"source_id":4352,"source_type":"Namespace","user_id":171,"notification_level":3,"created_at":"2019-11-20T17:04:36.821Z","updated_at":"2019-11-20T17:04:36.821Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":171,"email":"heidi@bosco.co.uk","username":"gerard.cruickshank"}}
{"id":13770,"access_level":20,"source_id":4352,"source_type":"Namespace","user_id":171,"notification_level":3,"created_at":"2019-11-20T17:04:36.821Z","updated_at":"2019-11-20T17:04:36.821Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":171,"
public_
email":"heidi@bosco.co.uk","username":"gerard.cruickshank"}}
{"id":13769,"access_level":30,"source_id":4352,"source_type":"Namespace","user_id":1157,"notification_level":3,"created_at":"2019-11-20T17:04:36.606Z","updated_at":"2019-11-20T17:04:36.606Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1157,"email":"larisa.bruen@carroll.biz","username":"milagros.reynolds"}}
{"id":13769,"access_level":30,"source_id":4352,"source_type":"Namespace","user_id":1157,"notification_level":3,"created_at":"2019-11-20T17:04:36.606Z","updated_at":"2019-11-20T17:04:36.606Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1157,"
public_
email":"larisa.bruen@carroll.biz","username":"milagros.reynolds"}}
{"id":13768,"access_level":40,"source_id":4352,"source_type":"Namespace","user_id":14,"notification_level":3,"created_at":"2019-11-20T17:04:36.465Z","updated_at":"2019-11-20T17:04:36.465Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":14,"email":"madlyn_kovacek@wiza.ca","username":"monique.gusikowski"}}
{"id":13768,"access_level":40,"source_id":4352,"source_type":"Namespace","user_id":14,"notification_level":3,"created_at":"2019-11-20T17:04:36.465Z","updated_at":"2019-11-20T17:04:36.465Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":14,"
public_
email":"madlyn_kovacek@wiza.ca","username":"monique.gusikowski"}}
{"id":13767,"access_level":10,"source_id":4352,"source_type":"Namespace","user_id":1167,"notification_level":3,"created_at":"2019-11-20T17:04:36.324Z","updated_at":"2019-11-20T17:04:36.324Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1167,"email":"mirella@koepp.ca","username":"eileen"}}
{"id":13767,"access_level":10,"source_id":4352,"source_type":"Namespace","user_id":1167,"notification_level":3,"created_at":"2019-11-20T17:04:36.324Z","updated_at":"2019-11-20T17:04:36.324Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1167,"
public_
email":"mirella@koepp.ca","username":"eileen"}}
{"id":12921,"access_level":50,"source_id":4352,"source_type":"Namespace","user_id":1,"notification_level":3,"created_at":"2019-11-20T17:01:53.953Z","updated_at":"2019-11-20T17:01:53.953Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1,"email":"admin@example.com","username":"root"}}
{"id":12921,"access_level":50,"source_id":4352,"source_type":"Namespace","user_id":1,"notification_level":3,"created_at":"2019-11-20T17:01:53.953Z","updated_at":"2019-11-20T17:01:53.953Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1,"
public_
email":"admin@example.com","username":"root"}}
spec/fixtures/lib/gitlab/import_export/group_exports/complex/tree/groups/4353/members.ndjson
View file @
c9375914
{"id":13786,"access_level":30,"source_id":4355,"source_type":"Namespace","user_id":1533,"notification_level":3,"created_at":"2019-11-20T17:04:39.405Z","updated_at":"2019-11-20T17:04:39.405Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1533,"email":"jose@cassin.ca","username":"buster"}}
{"id":13786,"access_level":30,"source_id":4355,"source_type":"Namespace","user_id":1533,"notification_level":3,"created_at":"2019-11-20T17:04:39.405Z","updated_at":"2019-11-20T17:04:39.405Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1533,"
public_
email":"jose@cassin.ca","username":"buster"}}
{"id":13785,"access_level":10,"source_id":4355,"source_type":"Namespace","user_id":1586,"notification_level":3,"created_at":"2019-11-20T17:04:39.269Z","updated_at":"2019-11-20T17:04:39.269Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1586,"email":"carie@gleichner.us","username":"dominque"}}
{"id":13785,"access_level":10,"source_id":4355,"source_type":"Namespace","user_id":1586,"notification_level":3,"created_at":"2019-11-20T17:04:39.269Z","updated_at":"2019-11-20T17:04:39.269Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1586,"
public_
email":"carie@gleichner.us","username":"dominque"}}
{"id":13784,"access_level":30,"source_id":4355,"source_type":"Namespace","user_id":190,"notification_level":3,"created_at":"2019-11-20T17:04:39.127Z","updated_at":"2019-11-20T17:04:39.127Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":190,"email":"delois@funk.biz","username":"kittie"}}
{"id":13784,"access_level":30,"source_id":4355,"source_type":"Namespace","user_id":190,"notification_level":3,"created_at":"2019-11-20T17:04:39.127Z","updated_at":"2019-11-20T17:04:39.127Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":190,"
public_
email":"delois@funk.biz","username":"kittie"}}
{"id":13783,"access_level":20,"source_id":4355,"source_type":"Namespace","user_id":254,"notification_level":3,"created_at":"2019-11-20T17:04:38.971Z","updated_at":"2019-11-20T17:04:38.971Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":254,"email":"tyra.lowe@whitemckenzie.co.uk","username":"kassie"}}
{"id":13783,"access_level":20,"source_id":4355,"source_type":"Namespace","user_id":254,"notification_level":3,"created_at":"2019-11-20T17:04:38.971Z","updated_at":"2019-11-20T17:04:38.971Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":254,"
public_
email":"tyra.lowe@whitemckenzie.co.uk","username":"kassie"}}
{"id":13782,"access_level":40,"source_id":4355,"source_type":"Namespace","user_id":503,"notification_level":3,"created_at":"2019-11-20T17:04:38.743Z","updated_at":"2019-11-20T17:04:38.743Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":503,"email":"tyesha.brakus@bruen.ca","username":"charise"}}
{"id":13782,"access_level":40,"source_id":4355,"source_type":"Namespace","user_id":503,"notification_level":3,"created_at":"2019-11-20T17:04:38.743Z","updated_at":"2019-11-20T17:04:38.743Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":503,"
public_
email":"tyesha.brakus@bruen.ca","username":"charise"}}
{"id":12924,"access_level":50,"source_id":4355,"source_type":"Namespace","user_id":1,"notification_level":3,"created_at":"2019-11-20T17:01:54.145Z","updated_at":"2019-11-20T17:01:54.145Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1,"email":"admin@example.com","username":"root"}}
{"id":12924,"access_level":50,"source_id":4355,"source_type":"Namespace","user_id":1,"notification_level":3,"created_at":"2019-11-20T17:01:54.145Z","updated_at":"2019-11-20T17:01:54.145Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1,"
public_
email":"admin@example.com","username":"root"}}
spec/fixtures/lib/gitlab/import_export/group_exports/no_children/group.json
View file @
c9375914
...
@@ -299,7 +299,7 @@
...
@@ -299,7 +299,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
42
,
"id"
:
42
,
"email"
:
"moriah@collinsmurphy.com"
,
"
public_
email"
:
"moriah@collinsmurphy.com"
,
"username"
:
"reported_user_15"
"username"
:
"reported_user_15"
}
}
},
},
...
@@ -322,7 +322,7 @@
...
@@ -322,7 +322,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
271
,
"id"
:
271
,
"email"
:
"garret@connellystark.ca"
,
"
public_
email"
:
"garret@connellystark.ca"
,
"username"
:
"charlesetta"
"username"
:
"charlesetta"
}
}
},
},
...
@@ -345,7 +345,7 @@
...
@@ -345,7 +345,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
206
,
"id"
:
206
,
"email"
:
"margaret.bergnaum@reynolds.us"
,
"
public_
email"
:
"margaret.bergnaum@reynolds.us"
,
"username"
:
"gwendolyn_robel"
"username"
:
"gwendolyn_robel"
}
}
},
},
...
@@ -368,7 +368,7 @@
...
@@ -368,7 +368,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
39
,
"id"
:
39
,
"email"
:
"alexis_berge@kerlukeklein.us"
,
"
public_
email"
:
"alexis_berge@kerlukeklein.us"
,
"username"
:
"reported_user_12"
"username"
:
"reported_user_12"
}
}
},
},
...
@@ -391,7 +391,7 @@
...
@@ -391,7 +391,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
1624
,
"id"
:
1624
,
"email"
:
"nakesha.herzog@powlowski.com"
,
"
public_
email"
:
"nakesha.herzog@powlowski.com"
,
"username"
:
"adriene.mcclure"
"username"
:
"adriene.mcclure"
}
}
},
},
...
@@ -414,7 +414,7 @@
...
@@ -414,7 +414,7 @@
"override"
:
false
,
"override"
:
false
,
"user"
:
{
"user"
:
{
"id"
:
1
,
"id"
:
1
,
"email"
:
"admin@example.com"
,
"
public_
email"
:
"admin@example.com"
,
"username"
:
"root"
"username"
:
"root"
}
}
}
}
...
...
spec/fixtures/lib/gitlab/import_export/group_exports/no_children/tree/groups/4353/members.ndjson
View file @
c9375914
{"id":13766,"access_level":30,"source_id":4351,"source_type":"Namespace","user_id":42,"notification_level":3,"created_at":"2019-11-20T17:04:36.184Z","updated_at":"2019-11-20T17:04:36.184Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":42,"email":"moriah@collinsmurphy.com","username":"reported_user_15"}}
{"id":13766,"access_level":30,"source_id":4351,"source_type":"Namespace","user_id":42,"notification_level":3,"created_at":"2019-11-20T17:04:36.184Z","updated_at":"2019-11-20T17:04:36.184Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":42,"
public_
email":"moriah@collinsmurphy.com","username":"reported_user_15"}}
{"id":13765,"access_level":40,"source_id":4351,"source_type":"Namespace","user_id":271,"notification_level":3,"created_at":"2019-11-20T17:04:36.044Z","updated_at":"2019-11-20T17:04:36.044Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":271,"email":"garret@connellystark.ca","username":"charlesetta"}}
{"id":13765,"access_level":40,"source_id":4351,"source_type":"Namespace","user_id":271,"notification_level":3,"created_at":"2019-11-20T17:04:36.044Z","updated_at":"2019-11-20T17:04:36.044Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":271,"
public_
email":"garret@connellystark.ca","username":"charlesetta"}}
{"id":13764,"access_level":30,"source_id":4351,"source_type":"Namespace","user_id":206,"notification_level":3,"created_at":"2019-11-20T17:04:35.840Z","updated_at":"2019-11-20T17:04:35.840Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":206,"email":"margaret.bergnaum@reynolds.us","username":"gwendolyn_robel"}}
{"id":13764,"access_level":30,"source_id":4351,"source_type":"Namespace","user_id":206,"notification_level":3,"created_at":"2019-11-20T17:04:35.840Z","updated_at":"2019-11-20T17:04:35.840Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":206,"
public_
email":"margaret.bergnaum@reynolds.us","username":"gwendolyn_robel"}}
{"id":13763,"access_level":10,"source_id":4351,"source_type":"Namespace","user_id":39,"notification_level":3,"created_at":"2019-11-20T17:04:35.704Z","updated_at":"2019-11-20T17:04:35.704Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":39,"email":"alexis_berge@kerlukeklein.us","username":"reported_user_12"}}
{"id":13763,"access_level":10,"source_id":4351,"source_type":"Namespace","user_id":39,"notification_level":3,"created_at":"2019-11-20T17:04:35.704Z","updated_at":"2019-11-20T17:04:35.704Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":39,"
public_
email":"alexis_berge@kerlukeklein.us","username":"reported_user_12"}}
{"id":13762,"access_level":20,"source_id":4351,"source_type":"Namespace","user_id":1624,"notification_level":3,"created_at":"2019-11-20T17:04:35.566Z","updated_at":"2019-11-20T17:04:35.566Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1624,"email":"nakesha.herzog@powlowski.com","username":"adriene.mcclure"}}
{"id":13762,"access_level":20,"source_id":4351,"source_type":"Namespace","user_id":1624,"notification_level":3,"created_at":"2019-11-20T17:04:35.566Z","updated_at":"2019-11-20T17:04:35.566Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1624,"
public_
email":"nakesha.herzog@powlowski.com","username":"adriene.mcclure"}}
{"id":12920,"access_level":50,"source_id":4351,"source_type":"Namespace","user_id":1,"notification_level":3,"created_at":"2019-11-20T17:01:53.505Z","updated_at":"2019-11-20T17:01:53.505Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1,"email":"admin@example.com","username":"root"}}
{"id":12920,"access_level":50,"source_id":4351,"source_type":"Namespace","user_id":1,"notification_level":3,"created_at":"2019-11-20T17:01:53.505Z","updated_at":"2019-11-20T17:01:53.505Z","created_by_id":null,"invite_email":null,"invite_token":null,"invite_accepted_at":null,"requested_at":null,"expires_at":null,"ldap":false,"override":false,"user":{"id":1,"
public_
email":"admin@example.com","username":"root"}}
spec/lib/gitlab/import_export/base/relation_factory_spec.rb
View file @
c9375914
...
@@ -102,7 +102,7 @@ RSpec.describe Gitlab::ImportExport::Base::RelationFactory do
...
@@ -102,7 +102,7 @@ RSpec.describe Gitlab::ImportExport::Base::RelationFactory do
"updated_at"
=>
"2016-11-18T09:29:42.634Z"
,
"updated_at"
=>
"2016-11-18T09:29:42.634Z"
,
"user"
=>
{
"user"
=>
{
"id"
=>
999
,
"id"
=>
999
,
"email"
=>
new_user
.
email
,
"
public_
email"
=>
new_user
.
email
,
"username"
=>
new_user
.
username
"username"
=>
new_user
.
username
}
}
}
}
...
...
spec/lib/gitlab/import_export/group/legacy_tree_saver_spec.rb
View file @
c9375914
...
@@ -83,11 +83,12 @@ RSpec.describe Gitlab::ImportExport::Group::LegacyTreeSaver do
...
@@ -83,11 +83,12 @@ RSpec.describe Gitlab::ImportExport::Group::LegacyTreeSaver do
let
(
:user2
)
{
create
(
:user
,
email:
'group@member.com'
)
}
let
(
:user2
)
{
create
(
:user
,
email:
'group@member.com'
)
}
let
(
:member_emails
)
do
let
(
:member_emails
)
do
saved_group_json
[
'members'
].
map
do
|
pm
|
saved_group_json
[
'members'
].
map
do
|
pm
|
pm
[
'user'
][
'email'
]
pm
[
'user'
][
'
public_
email'
]
end
end
end
end
before
do
before
do
user2
.
update
(
public_email:
user2
.
email
)
group
.
add_developer
(
user2
)
group
.
add_developer
(
user2
)
end
end
...
...
spec/lib/gitlab/import_export/members_mapper_spec.rb
View file @
c9375914
...
@@ -24,7 +24,7 @@ RSpec.describe Gitlab::ImportExport::MembersMapper do
...
@@ -24,7 +24,7 @@ RSpec.describe Gitlab::ImportExport::MembersMapper do
"user"
=>
"user"
=>
{
{
"id"
=>
exported_user_id
,
"id"
=>
exported_user_id
,
"email"
=>
user2
.
email
,
"
public_
email"
=>
user2
.
email
,
"username"
=>
'test'
"username"
=>
'test'
},
},
"user_id"
=>
19
"user_id"
=>
19
...
@@ -122,7 +122,7 @@ RSpec.describe Gitlab::ImportExport::MembersMapper do
...
@@ -122,7 +122,7 @@ RSpec.describe Gitlab::ImportExport::MembersMapper do
"user"
=>
"user"
=>
{
{
"id"
=>
exported_user_id
,
"id"
=>
exported_user_id
,
"email"
=>
user2
.
email
,
"
public_
email"
=>
user2
.
email
,
"username"
=>
'test'
"username"
=>
'test'
},
},
"user_id"
=>
19
"user_id"
=>
19
...
@@ -157,6 +157,37 @@ RSpec.describe Gitlab::ImportExport::MembersMapper do
...
@@ -157,6 +157,37 @@ RSpec.describe Gitlab::ImportExport::MembersMapper do
expect
(
members_mapper
.
map
[
exported_user_id
]).
to
eq
(
user2
.
id
)
expect
(
members_mapper
.
map
[
exported_user_id
]).
to
eq
(
user2
.
id
)
end
end
end
end
context
'when user has email exported'
do
let
(
:exported_members
)
do
[
{
"id"
=>
2
,
"access_level"
=>
40
,
"source_id"
=>
14
,
"source_type"
=>
source_type
,
"notification_level"
=>
3
,
"created_at"
=>
"2016-03-11T10:21:44.822Z"
,
"updated_at"
=>
"2016-03-11T10:21:44.822Z"
,
"created_by_id"
=>
nil
,
"invite_email"
=>
nil
,
"invite_token"
=>
nil
,
"invite_accepted_at"
=>
nil
,
"user"
=>
{
"id"
=>
exported_user_id
,
"email"
=>
user2
.
email
,
"username"
=>
'test'
},
"user_id"
=>
19
}
]
end
it
'maps a member'
do
expect
(
members_mapper
.
map
[
exported_user_id
]).
to
eq
(
user2
.
id
)
end
end
end
end
context
'when importable is Project'
do
context
'when importable is Project'
do
...
@@ -212,7 +243,7 @@ RSpec.describe Gitlab::ImportExport::MembersMapper do
...
@@ -212,7 +243,7 @@ RSpec.describe Gitlab::ImportExport::MembersMapper do
before
do
before
do
group
.
add_users
([
user
,
user2
],
GroupMember
::
DEVELOPER
)
group
.
add_users
([
user
,
user2
],
GroupMember
::
DEVELOPER
)
user
.
update
(
email:
'invite@test.com'
)
user
.
update
(
public_
email:
'invite@test.com'
)
end
end
it
'maps the importer'
do
it
'maps the importer'
do
...
...
spec/lib/gitlab/import_export/project/relation_factory_spec.rb
View file @
c9375914
...
@@ -119,7 +119,7 @@ RSpec.describe Gitlab::ImportExport::Project::RelationFactory, :use_clean_rails_
...
@@ -119,7 +119,7 @@ RSpec.describe Gitlab::ImportExport::Project::RelationFactory, :use_clean_rails_
"updated_at"
=>
"2016-11-18T09:29:42.634Z"
,
"updated_at"
=>
"2016-11-18T09:29:42.634Z"
,
"user"
=>
{
"user"
=>
{
"id"
=>
admin
.
id
,
"id"
=>
admin
.
id
,
"email"
=>
admin
.
email
,
"
public_
email"
=>
admin
.
email
,
"username"
=>
admin
.
username
"username"
=>
admin
.
username
}
}
}
}
...
@@ -187,7 +187,7 @@ RSpec.describe Gitlab::ImportExport::Project::RelationFactory, :use_clean_rails_
...
@@ -187,7 +187,7 @@ RSpec.describe Gitlab::ImportExport::Project::RelationFactory, :use_clean_rails_
"updated_at"
=>
"2016-11-18T09:29:42.634Z"
,
"updated_at"
=>
"2016-11-18T09:29:42.634Z"
,
"user"
=>
{
"user"
=>
{
"id"
=>
admin
.
id
,
"id"
=>
admin
.
id
,
"email"
=>
admin
.
email
,
"
public_
email"
=>
admin
.
email
,
"username"
=>
admin
.
username
"username"
=>
admin
.
username
}
}
}
}
...
...
spec/lib/gitlab/import_export/project/tree_saver_spec.rb
View file @
c9375914
...
@@ -299,12 +299,13 @@ RSpec.describe Gitlab::ImportExport::Project::TreeSaver do
...
@@ -299,12 +299,13 @@ RSpec.describe Gitlab::ImportExport::Project::TreeSaver do
let
(
:member_emails
)
do
let
(
:member_emails
)
do
emails
=
subject
.
map
do
|
pm
|
emails
=
subject
.
map
do
|
pm
|
pm
[
'user'
][
'email'
]
pm
[
'user'
][
'
public_
email'
]
end
end
emails
emails
end
end
before
do
before
do
user2
.
update
(
public_email:
user2
.
email
)
group
.
add_developer
(
user2
)
group
.
add_developer
(
user2
)
end
end
...
...
spec/support/shared_examples/lib/gitlab/import_export/relation_factory_shared_examples.rb
View file @
c9375914
...
@@ -19,7 +19,7 @@ RSpec.shared_examples 'Notes user references' do
...
@@ -19,7 +19,7 @@ RSpec.shared_examples 'Notes user references' do
'updated_at'
=>
'2016-11-18T09:29:42.634Z'
,
'updated_at'
=>
'2016-11-18T09:29:42.634Z'
,
'user'
=>
{
'user'
=>
{
'id'
=>
999
,
'id'
=>
999
,
'email'
=>
mapped_user
.
email
,
'
public_
email'
=>
mapped_user
.
email
,
'username'
=>
mapped_user
.
username
'username'
=>
mapped_user
.
username
}
}
}
}
...
...
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