Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bradley Wood
rust-gitlab
Commits
e8ae903d
Commit
e8ae903d
authored
Oct 25, 2018
by
Brad King
Browse files
types: update for 11.4
Users gained a field for their public email address, if any.
parent
57ebae39
Changes
4
Show whitespace changes
Inline
Side-by-side
data/user.json
View file @
e8ae903d
{
"two_factor_enabled"
:
true
,
"can_create_project"
:
true
,
"confirmed_at"
:
"2015-02-26T10:58:34.660-05:00"
,
"twitter"
:
""
,
"linkedin"
:
""
,
"color_scheme_id"
:
4
,
"web_url"
:
"https://gitlab.kitware.com/kwrobot"
,
"skype"
:
""
,
"identities"
:
[],
"id"
:
11
,
"projects_limit"
:
50
,
"current_sign_in_at"
:
"2018-
08-24T10:10:45.623
-04:00"
,
"state"
:
"active"
,
"location"
:
null
,
"email"
:
"kwrobot@kitware.com"
,
"website_url"
:
""
,
"username"
:
"kwrobot"
,
"bio"
:
""
,
"private_profile"
:
null
,
"last_sign_in_at"
:
"2018-
07-18T07:33:59.612
-04:00"
,
"last_activity_on"
:
"2018-0
8
-2
8
"
,
"external"
:
false
,
"organization"
:
null
,
"name"
:
"Kitware Robot"
,
"can_create_group"
:
true
,
"created_at"
:
"2015-02-26T10:58:34.670-05:00"
,
"avatar_url"
:
"https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon"
,
"theme_id"
:
null
}
{
"two_factor_enabled"
:
true
,
"can_create_project"
:
true
,
"confirmed_at"
:
"2015-02-26T10:58:34.660-05:00"
,
"twitter"
:
""
,
"linkedin"
:
""
,
"color_scheme_id"
:
4
,
"web_url"
:
"https://gitlab.kitware.com/kwrobot"
,
"skype"
:
""
,
"identities"
:
[],
"id"
:
11
,
"projects_limit"
:
50
,
"current_sign_in_at"
:
"2018-
10-11T08:36:09.687
-04:00"
,
"state"
:
"active"
,
"location"
:
null
,
"email"
:
"kwrobot@kitware.com"
,
"website_url"
:
""
,
"username"
:
"kwrobot"
,
"bio"
:
""
,
"private_profile"
:
null
,
"last_sign_in_at"
:
"2018-
10-08T13:25:29.086
-04:00"
,
"last_activity_on"
:
"2018-
1
0-2
5
"
,
"external"
:
false
,
"organization"
:
null
,
"public_email"
:
""
,
"name"
:
"Kitware Robot"
,
"can_create_group"
:
true
,
"created_at"
:
"2015-02-26T10:58:34.670-05:00"
,
"avatar_url"
:
"https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon"
,
"theme_id"
:
null
}
data/user_public.json
View file @
e8ae903d
{
"two_factor_enabled"
:
true
,
"can_create_project"
:
true
,
"confirmed_at"
:
"2015-02-26T10:58:34.660-05:00"
,
"twitter"
:
""
,
"linkedin"
:
""
,
"color_scheme_id"
:
4
,
"web_url"
:
"https://gitlab.kitware.com/kwrobot"
,
"skype"
:
""
,
"is_admin"
:
true
,
"identities"
:
[],
"id"
:
11
,
"projects_limit"
:
50
,
"current_sign_in_at"
:
"2018-
08-24T10:10:45.623
-04:00"
,
"state"
:
"active"
,
"location"
:
null
,
"email"
:
"kwrobot@kitware.com"
,
"website_url"
:
""
,
"username"
:
"kwrobot"
,
"bio"
:
""
,
"private_profile"
:
null
,
"last_sign_in_at"
:
"2018-
07-18T07:33:59.612
-04:00"
,
"last_activity_on"
:
"2018-0
8
-2
8
"
,
"external"
:
false
,
"organization"
:
null
,
"name"
:
"Kitware Robot"
,
"can_create_group"
:
true
,
"created_at"
:
"2015-02-26T10:58:34.670-05:00"
,
"avatar_url"
:
"https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon"
,
"theme_id"
:
null
}
{
"two_factor_enabled"
:
true
,
"can_create_project"
:
true
,
"confirmed_at"
:
"2015-02-26T10:58:34.660-05:00"
,
"twitter"
:
""
,
"linkedin"
:
""
,
"color_scheme_id"
:
4
,
"web_url"
:
"https://gitlab.kitware.com/kwrobot"
,
"skype"
:
""
,
"is_admin"
:
true
,
"identities"
:
[],
"id"
:
11
,
"projects_limit"
:
50
,
"current_sign_in_at"
:
"2018-
10-11T08:36:09.687
-04:00"
,
"state"
:
"active"
,
"location"
:
null
,
"email"
:
"kwrobot@kitware.com"
,
"website_url"
:
""
,
"username"
:
"kwrobot"
,
"bio"
:
""
,
"private_profile"
:
null
,
"last_sign_in_at"
:
"2018-
10-08T13:25:29.086
-04:00"
,
"last_activity_on"
:
"2018-
1
0-2
5
"
,
"external"
:
false
,
"organization"
:
null
,
"public_email"
:
""
,
"name"
:
"Kitware Robot"
,
"can_create_group"
:
true
,
"created_at"
:
"2015-02-26T10:58:34.670-05:00"
,
"avatar_url"
:
"https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon"
,
"theme_id"
:
null
}
src/test/types.rs
View file @
e8ae903d
...
...
@@ -550,6 +550,7 @@ fn test_read_user() {
assert_eq!
(
user
.bio
,
Some
(
""
.to_string
()));
assert_eq!
(
user
.private_profile
,
None
);
assert_eq!
(
user
.location
,
None
);
assert_eq!
(
user
.public_email
,
Some
(
""
.to_string
()));
assert_eq!
(
user
.skype
,
""
);
assert_eq!
(
user
.linkedin
,
""
);
assert_eq!
(
user
.twitter
,
""
);
...
...
@@ -576,16 +577,17 @@ fn test_read_user_public() {
assert_eq!
(
user_public
.bio
,
Some
(
""
.to_string
()));
assert_eq!
(
user_public
.private_profile
,
None
);
assert_eq!
(
user_public
.location
,
None
);
assert_eq!
(
user_public
.public_email
,
Some
(
""
.to_string
()));
assert_eq!
(
user_public
.skype
,
""
);
assert_eq!
(
user_public
.linkedin
,
""
);
assert_eq!
(
user_public
.twitter
,
""
);
assert_eq!
(
user_public
.website_url
,
""
);
assert_eq!
(
user_public
.organization
,
None
);
assert_eq!
(
user_public
.last_sign_in_at
,
Some
(
Utc
.ymd
(
2018
,
7
,
1
8
)
.and_hms_milli
(
1
1
,
33
,
5
9
,
6
12
)));
Some
(
Utc
.ymd
(
2018
,
10
,
8
)
.and_hms_milli
(
1
7
,
25
,
2
9
,
8
6
)));
assert_eq!
(
user_public
.last_activity_on
,
Some
(
NaiveDate
::
from_ymd
(
2018
,
8
,
2
8
)));
Some
(
NaiveDate
::
from_ymd
(
2018
,
10
,
2
5
)));
assert_eq!
(
user_public
.confirmed_at
,
Some
(
Utc
.ymd
(
2015
,
2
,
26
)
.and_hms_milli
(
15
,
58
,
34
,
660
)));
...
...
@@ -594,8 +596,8 @@ fn test_read_user_public() {
assert_eq!
(
user_public
.color_scheme_id
,
ColorSchemeId
::
new
(
4
));
assert_eq!
(
user_public
.projects_limit
,
50
);
assert_eq!
(
user_public
.current_sign_in_at
,
Some
(
Utc
.ymd
(
2018
,
8
,
24
)
.and_hms_milli
(
1
4
,
10
,
45
,
6
23
)));
Some
(
Utc
.ymd
(
2018
,
10
,
11
)
.and_hms_milli
(
1
2
,
36
,
9
,
6
87
)));
assert
!
(
user_public
.identities
.is_empty
());
assert_eq!
(
user_public
.can_create_group
,
true
);
assert_eq!
(
user_public
.can_create_project
,
true
);
...
...
src/types.rs
View file @
e8ae903d
...
...
@@ -105,6 +105,8 @@ pub struct User {
pub
private_profile
:
Option
<
bool
>
,
/// Geographic location of the user.
pub
location
:
Option
<
String
>
,
/// User public email address, if any.
pub
public_email
:
Option
<
String
>
,
/// Skype contact information.
pub
skype
:
String
,
...
...
@@ -181,6 +183,8 @@ pub struct UserPublic {
pub
private_profile
:
Option
<
bool
>
,
/// Geographic location of the user.
pub
location
:
Option
<
String
>
,
/// User public email address, if any.
pub
public_email
:
Option
<
String
>
,
/// Skype contact information.
pub
skype
:
String
,
...
...
@@ -251,6 +255,7 @@ impl From<UserPublic> for User {
bio
:
user
.bio
,
private_profile
:
user
.private_profile
,
location
:
user
.location
,
public_email
:
user
.public_email
,
skype
:
user
.skype
,
linkedin
:
user
.linkedin
,
twitter
:
user
.twitter
,
...
...
Write
Preview
Supports
Markdown
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