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

[Alerting][Discover] Hide Alerts menu item when user does not have access to Stack Rules #135655

Merged

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented Jul 4, 2022

Addresses: #135642

Summary

This PR hides "Alerts" menu item if user's role does not include Management > Stack Rules privilege.
This PR does not remove Create rule action from the Alerts popover as it requires more complex checks for certain rule types.

Fore testing:

  • Create a custom user role which has access to Discover but not to Stack Rules
  • Create a new user with this role and login
  • Check that "Alerts" is not present on Discover page but it's available there if access to Stack Rules is granted to the user.

@jughosta jughosta added Feature:Discover Discover Application release_note:fix Feature:Alerting Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) backport:prev-minor Backport to the previous minor version (i.e. one version back from main) labels Jul 4, 2022
@jughosta jughosta marked this pull request as ready for review July 4, 2022 15:49
@jughosta jughosta requested a review from a team as a code owner July 4, 2022 15:49
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@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
discover 492.0KB 492.1KB +123.0B

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

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

LGTM 👍 , tested locally, works as expected. thx for fine-tuning our Discover alerting experience!

@jughosta jughosta merged commit 1b3c4e4 into elastic:main Jul 5, 2022
@jughosta jughosta deleted the 135642-fix-access-to-rules-on-discover branch July 5, 2022 10:06
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 5, 2022
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 5, 2022
…nagement (#135655) (#135690)

(cherry picked from commit 1b3c4e4)

Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to the previous minor version (i.e. one version back from main) Feature:Alerting Feature:Discover Discover Application release_note:fix Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) v8.3.2 v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants