Adding extra properties to corp user editable info (#4097)

This commit is contained in:
John Joyce 2022-02-09 08:58:40 -08:00 committed by GitHub
parent dbcfe9e50e
commit 0f56bc5d48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 80 additions and 0 deletions

View File

@ -138,6 +138,9 @@ public class CorpUserType implements SearchableEntityType<CorpUser>, MutableType
private RecordTemplate mapCorpUserEditableInfo(CorpUserUpdateInput input, Optional<CorpUserEditableInfo> existing) {
CorpUserEditableInfo result = existing.orElseGet(() -> new CorpUserEditableInfo());
if (input.getDisplayName() != null) {
result.setDisplayName(input.getDisplayName());
}
if (input.getAboutMe() != null) {
result.setAboutMe(input.getAboutMe());
}
@ -162,6 +165,9 @@ public class CorpUserType implements SearchableEntityType<CorpUser>, MutableType
if (input.getEmail() != null) {
result.setEmail(input.getEmail());
}
if (input.getTitle() != null) {
result.setTitle(input.getTitle());
}
return result;
}

View File

@ -21,6 +21,8 @@ public class CorpUserEditableInfoMapper implements ModelMapper<com.linkedin.iden
@Override
public CorpUserEditableProperties apply(@Nonnull final com.linkedin.identity.CorpUserEditableInfo info) {
final CorpUserEditableProperties result = new CorpUserEditableProperties();
result.setDisplayName(info.getDisplayName());
result.setTitle(info.getTitle());
result.setAboutMe(info.getAboutMe());
result.setSkills(info.getSkills());
result.setTeams(info.getTeams());

View File

@ -21,6 +21,8 @@ public class CorpUserPropertiesMapper implements ModelMapper<com.linkedin.identi
@Override
public CorpUserProperties apply(@Nonnull final com.linkedin.identity.CorpUserInfo info) {
final CorpUserProperties result = new CorpUserProperties();
result.setDisplayName(info.getDisplayName());
result.setTitle(info.getTitle());
result.setActive(info.isActive());
result.setCountryCode(info.getCountryCode());
result.setDepartmentId(info.getDepartmentId());

View File

@ -2217,6 +2217,16 @@ Deprecated, use CorpUserEditableProperties instead
Additional read write info about a user
"""
type CorpUserEditableInfo {
"""
Display name to show on DataHub
"""
displayName: String
"""
Title to show on DataHub
"""
title: String
"""
About me section of the user
"""
@ -2242,6 +2252,16 @@ type CorpUserEditableInfo {
Additional read write properties about a user
"""
type CorpUserEditableProperties {
"""
Display name to show on DataHub
"""
displayName: String
"""
Title to show on DataHub
"""
title: String
"""
About me section of the user
"""
@ -2283,6 +2303,16 @@ type CorpUserEditableProperties {
Arguments provided to update a CorpUser Entity
"""
input CorpUserUpdateInput {
"""
Display name to show on DataHub
"""
displayName: String
"""
Title to show on DataHub
"""
title: String
"""
About me section of the user
"""

View File

@ -41,6 +41,16 @@ record CorpUserEditableInfo {
*/
pictureLink: Url = "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/default_avatar.png"
/**
* DataHub-native display name
*/
displayName: optional string
/**
* DataHub-native Title, e.g. 'Software Engineer'
*/
title: optional string
/**
* Slack handle for the user
*/

View File

@ -1674,6 +1674,16 @@
"type" : "com.linkedin.common.Url",
"doc" : "A URL which points to a picture which user wants to set as a profile photo",
"default" : "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/default_avatar.png"
}, {
"name" : "displayName",
"type" : "string",
"doc" : "DataHub-native display name",
"optional" : true
}, {
"name" : "title",
"type" : "string",
"doc" : "DataHub-native Title, e.g. 'Software Engineer'",
"optional" : true
}, {
"name" : "slack",
"type" : "string",

View File

@ -2098,6 +2098,16 @@
"type" : "com.linkedin.common.Url",
"doc" : "A URL which points to a picture which user wants to set as a profile photo",
"default" : "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/default_avatar.png"
}, {
"name" : "displayName",
"type" : "string",
"doc" : "DataHub-native display name",
"optional" : true
}, {
"name" : "title",
"type" : "string",
"doc" : "DataHub-native Title, e.g. 'Software Engineer'",
"optional" : true
}, {
"name" : "slack",
"type" : "string",

View File

@ -1431,6 +1431,16 @@
"type" : "com.linkedin.common.Url",
"doc" : "A URL which points to a picture which user wants to set as a profile photo",
"default" : "https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web-react/src/images/default_avatar.png"
}, {
"name" : "displayName",
"type" : "string",
"doc" : "DataHub-native display name",
"optional" : true
}, {
"name" : "title",
"type" : "string",
"doc" : "DataHub-native Title, e.g. 'Software Engineer'",
"optional" : true
}, {
"name" : "slack",
"type" : "string",