mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 01:48:24 +00:00
Adding extra properties to corp user editable info (#4097)
This commit is contained in:
parent
dbcfe9e50e
commit
0f56bc5d48
@ -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;
|
||||
}
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -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
|
||||
"""
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user