-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Adding check to show/hide Avatar form based on whether the user is a … #135743
Merged
kc13greiner
merged 20 commits into
elastic:main
from
kc13greiner:feature/hide_avatar_form_for_cloud_user
Jul 20, 2022
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9291b07
Adding check to show/hide Avatar form based on whether the user is a …
kc13greiner 044fae9
Merge branch 'main' into feature/hide_avatar_form_for_cloud_user
kc13greiner 60f7c0c
Merge branch 'main' into feature/hide_avatar_form_for_cloud_user
kibanamachine b668d7f
Merge branch 'main' into feature/hide_avatar_form_for_cloud_user
kc13greiner 5457cc7
Merge branch 'main' into feature/hide_avatar_form_for_cloud_user
kc13greiner 8df287d
Adding tests to verify the avatar doesnt show up in the UserProfile i…
kc13greiner 45d16fc
Changing the name of the link to 'Edit Profile' and making it availab…
kc13greiner af6af23
Adding/Updating unit tests and fixing translation files
kc13greiner b32c578
Removing unused values from FormattedText and related tests
kc13greiner af16260
Merge branch 'main' into feature/hide_avatar_form_for_cloud_user
kc13greiner 662482c
Merge branch 'main' into feature/hide_avatar_form_for_cloud_user
kc13greiner bc54331
Updating unit test to work with merge from main
kc13greiner 20adf25
Merge branch 'main' into feature/hide_avatar_form_for_cloud_user
kc13greiner a3dd8c4
Merge branch 'main' into feature/hide_avatar_form_for_cloud_user
kibanamachine 1067020
Updating link to read Edit Profile to match wireframes per PR review
kc13greiner 43a12fe
Reverting changes to translation files and changing the cloud Edit Pr…
kc13greiner 6b12199
Changing capitalization of 'profile' so it follows the naming convention
kc13greiner 9bfd590
Changing nav menu logic to only render the default Edit Profile link …
kc13greiner b327af7
Merge branch 'main' into feature/hide_avatar_form_for_cloud_user
kc13greiner e3afd79
Updating logic to display custom nav links if user is a cloud user an…
kc13greiner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: while testing this change I discovered that we rely on the user's roles (specifically
superuser
role) to determine whether we should show Cloud specific links or not (added in #97870). If we keep this Cloud plugin logic as is, after this PR non-Cloud managed superusers won't be able to edit their profiles in Kibana (we'll be rendering a singleEdit profile
link leading to Cloud UI instead ofProfile
andPreferences
links we had previously).@legrego do I understand correctly that we can now switch this code to rely on
elastic_cloud_user
user property instead or is there still a legitimate reason for non-Cloud managed superusers to see Cloud specific links?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct, we should switch this code to rely on
elastic_cloud_user
instead of the role check. Thesuperuser
check was a hard-coded workaround because we didn't have a way to reliably determine which users were cloud users back then.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks for confirming, Larry.