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

[Logs UI] Check for privileges with user management links #91134

Merged
merged 3 commits into from
Feb 16, 2021

Conversation

Kerry350
Copy link
Contributor

Summary

This PR fixes #79264.

I'd considered hoisting these checks one level higher to the prompts (setup and results) and only conditionally providing the actions to the EUI prompt, or even wrapping the results / setup privileges prompts with a new component that could pass a canAccessUserManagement prop, but honestly both just seemed needlessly complex.

Testing

Across both the categories and anomalies pages, and also across both the setup scenario and the viewing results scenario, if the user is lacking in ML privileges the Manage Users button should only appear if the user has the sufficient management privileges (management > security > users).

@Kerry350 Kerry350 added release_note:fix v8.0.0 Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.12.0 labels Feb 11, 2021
@Kerry350 Kerry350 added this to the Logs UI 7.12 milestone Feb 11, 2021
@Kerry350 Kerry350 requested a review from a team February 11, 2021 13:57
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@Kerry350 Kerry350 self-assigned this Feb 11, 2021
@Kerry350
Copy link
Contributor Author

@elasticmachine merge upstream

@weltenwort weltenwort self-requested a review February 15, 2021 18:00
Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

Seems to work as intended 👍

…tup/user_management_link.tsx

Co-authored-by: Felix Stürmer <[email protected]>
@kibanamachine
Copy link
Contributor

💚 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
infra 1.9MB 1.9MB +635.0B

History

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

@Kerry350 Kerry350 merged commit aa1f024 into elastic:master Feb 16, 2021
Kerry350 added a commit to Kerry350/kibana that referenced this pull request Feb 16, 2021
)

* Wrap users management link with privileges check
Kerry350 added a commit that referenced this pull request Feb 16, 2021
…91490)

* Wrap users management link with privileges check

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature release_note:fix Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Logs UI] Guard links to user management according to user privileges
4 participants