Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.17] [Security Solution][Notes] - disable add note button in flyout…
… is user lacks privileges (#201707) (#201802) # Backport This will backport the following commits from `main` to `8.17`: - [[Security Solution][Notes] - disable add note button in flyout is user lacks privileges (#201707)](#201707) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Philippe Oberti","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-26T14:36:47Z","message":"[Security Solution][Notes] - disable add note button in flyout is user lacks privileges (#201707)\n\n## Summary\r\n\r\nThis PR fixes a small issue where users could click on the add button in\r\nthe alert details flyout even if they did not have the correct\r\nprivileges.\r\n\r\nWhen the user has the correct privileges, the UI does not change. In the\r\nflyout:\r\n- if no notes have previously been created for the document, we show a\r\n`Add note` button\r\n- if some notes have previously been created for the document, we show\r\nthe number of notes and a plus button icon\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d9a27b70-99b1-4562-8224-4f5c2f25b001\r\n\r\nWhen the user does not have the correct privileges, the flyout UI now\r\nshows the following:\r\n- if no notes have previously been created for the document, we show a\r\n`-`\r\n- if one or more notes have been created for the document, we show the\r\nnumber of notes followed by a `View note(s)` button, that - when clicked\r\n- opens the left panel for the user to view the notes\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8ebe8bf5-16ab-4652-b4d3-47507c2d3673\r\n\r\nhttps://github.com//issues/201702\r\n\r\n### Checklist\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"c7b5b35b199611741993e124811352472e8323f2","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Threat Hunting:Investigations","backport:version","v8.17.0"],"title":"[Security Solution][Notes] - disable add note button in flyout is user lacks privileges","number":201707,"url":"https://github.com/elastic/kibana/pull/201707","mergeCommit":{"message":"[Security Solution][Notes] - disable add note button in flyout is user lacks privileges (#201707)\n\n## Summary\r\n\r\nThis PR fixes a small issue where users could click on the add button in\r\nthe alert details flyout even if they did not have the correct\r\nprivileges.\r\n\r\nWhen the user has the correct privileges, the UI does not change. In the\r\nflyout:\r\n- if no notes have previously been created for the document, we show a\r\n`Add note` button\r\n- if some notes have previously been created for the document, we show\r\nthe number of notes and a plus button icon\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d9a27b70-99b1-4562-8224-4f5c2f25b001\r\n\r\nWhen the user does not have the correct privileges, the flyout UI now\r\nshows the following:\r\n- if no notes have previously been created for the document, we show a\r\n`-`\r\n- if one or more notes have been created for the document, we show the\r\nnumber of notes followed by a `View note(s)` button, that - when clicked\r\n- opens the left panel for the user to view the notes\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8ebe8bf5-16ab-4652-b4d3-47507c2d3673\r\n\r\nhttps://github.com//issues/201702\r\n\r\n### Checklist\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"c7b5b35b199611741993e124811352472e8323f2"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201707","number":201707,"mergeCommit":{"message":"[Security Solution][Notes] - disable add note button in flyout is user lacks privileges (#201707)\n\n## Summary\r\n\r\nThis PR fixes a small issue where users could click on the add button in\r\nthe alert details flyout even if they did not have the correct\r\nprivileges.\r\n\r\nWhen the user has the correct privileges, the UI does not change. In the\r\nflyout:\r\n- if no notes have previously been created for the document, we show a\r\n`Add note` button\r\n- if some notes have previously been created for the document, we show\r\nthe number of notes and a plus button icon\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d9a27b70-99b1-4562-8224-4f5c2f25b001\r\n\r\nWhen the user does not have the correct privileges, the flyout UI now\r\nshows the following:\r\n- if no notes have previously been created for the document, we show a\r\n`-`\r\n- if one or more notes have been created for the document, we show the\r\nnumber of notes followed by a `View note(s)` button, that - when clicked\r\n- opens the left panel for the user to view the notes\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8ebe8bf5-16ab-4652-b4d3-47507c2d3673\r\n\r\nhttps://github.com//issues/201702\r\n\r\n### Checklist\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"c7b5b35b199611741993e124811352472e8323f2"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Philippe Oberti <[email protected]>
- Loading branch information