Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove non-existent display_name field from the UserProfileUserInfo interface. #139091

Merged
merged 6 commits into from
Aug 24, 2022

Conversation

azasypkin
Copy link
Member

@azasypkin azasypkin commented Aug 18, 2022

Summary

As of elastic/elasticsearch#84257, display_name is no longer returned from the Elasticsearch User Profiles API endpoints as it was decided that editable display_name isn't needed at the moment.

The synthetic display_name we render as a human readable user "identifier" follows this logic user.full_name (optional) || user.email (optional) || user.username (required). This PR exposes getUserDisplayName function that accepts UserProfile or User instances and returns the most suitable display name. Here is the context for this change shared by @MichaelMarcialis:

There was a concern about the consistency of display name values: it would appear odd to have some display names show as full name, some as email, and others as user name. Ultimately though, it was suggested that such situations would likely be edge cases, and we would proceed with the full name > email > user name cascade for display name.

It was also noted that Cloud users don’t really have a human-readable user name. They are assigned a random numeric ID on account creation, which wouldn’t look too pretty in user lists throughout Kibana. As such, it made sense to have email chosen for display name before user name, as email is required for Cloud accounts and would be far more identifiable than their user ID.

cc @jonathan-buttner

@azasypkin azasypkin added chore Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Feature:Security/User Profile labels Aug 18, 2022
@azasypkin azasypkin marked this pull request as ready for review August 18, 2022 12:43
@azasypkin azasypkin requested a review from a team as a code owner August 18, 2022 12:43
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

Copy link
Contributor

@kc13greiner kc13greiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@azasypkin azasypkin added the ci:cloud-deploy Create or update a Cloud deployment label Aug 24, 2022
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
security 513.4KB 513.5KB +55.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
security 51.9KB 52.0KB +18.0B
Unknown metric groups

API count

id before after diff
@kbn/user-profile-components 40 45 +5
security 240 245 +5
total +10

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@azasypkin azasypkin requested a review from kc13greiner August 24, 2022 09:05
Copy link
Contributor

@kc13greiner kc13greiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@azasypkin azasypkin merged commit 6817fad into elastic:main Aug 24, 2022
@azasypkin azasypkin deleted the issue-xxx-profile-enhancements branch August 24, 2022 11:50
Mpdreamz pushed a commit to Mpdreamz/kibana that referenced this pull request Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting chore ci:cloud-deploy Create or update a Cloud deployment Feature:Security/User Profile release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants