[8.19] [Security Solution][Entity Analytics][UI] Adding code to check privileges for enabling the Run Engine button (#213054)#219896
Closed
abhishekbhatia1710 wants to merge 1 commit intoelastic:8.19from
Conversation
…eges for enabling the Run Engine button (elastic#213054) ## Summary **What:** Updated the `EntityAnalyticsManagementPage` component to enhance user privilege checks and disable the "Run Engine" button when necessary conditions are not met. **Why:** To improve UI/UX by preventing users from attempting actions they don’t have the required privileges for, ensuring a clearer user experience by displaying errors when required. ## Test Steps - Open Kibana and enable the risk engine - Create a user with no cluster privileges - Login with the no-privileges user - Go to the Entity Risk Score page - The Run Engine button should be disabled. - Login now with the "elastic" user. - Go to the Entity Risk Score page - The Run Engine button should be enabled - Clicking the Run Engine button should update the countdown text to 'Now running' and disable the button. ## Screenshots ### The "Run Engine" button is enabled, but an error is displayed, and the `scheduleRiskEngine` API call is not triggered. cluster privileges ### The "Run Engine" button is disabled because the user lacks the required privileges.  ### User with all the privileges  ### Run Engine button is disabled when countdown text shows "Now running" (for admin user) https://github.com/user-attachments/assets/8d1279f1-6d4c-44b2-b7a8-75e5114af73b ### Run Engine button is disabled when countdown text shows "Now running" (for user without `manage_index_templates` privilege) https://github.com/user-attachments/assets/bb207a23-ae0a-4eb9-8400-ea023a47bb4c ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit 12c3433)
2 tasks
Collaborator
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Page load bundle
|
Contributor
Author
|
It was decided that backports are not necessary for this change, as it includes both a feature addition and a bug fix. |
auto-merge was automatically disabled
May 14, 2025 05:45
Pull request was closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport
This will backport the following commits from
mainto8.19:Questions ?
Please refer to the Backport tool documentation