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

[Security Solution][Notes] - fix user filter not checking correct license in notes management page #197149

Merged

Conversation

PhilippeOberti
Copy link
Contributor

@PhilippeOberti PhilippeOberti commented Oct 21, 2024

Summary

This PR fixes an issue (thanks @christineweng for finding it) on the Notes management page where users with a basic license are getting a snackbar mentioning that the users api is not available.
Screenshot 2024-10-21 at 4 12 23 PM
Screenshot 2024-10-21 at 4 15 15 PM

The PR now checks and enables the dropdown only the user have the correct license. Similarly, the call to fetch users is only performed if the license is platinum (using the enabled property from ReactQuery).

Basic license

Screenshot 2024-10-21 at 5 22 20 PM

Platinum (or trial) license

Screenshot 2024-10-21 at 5 21 20 PM

Checklist

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 6035 6036 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 20.7MB 20.7MB +2.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolutionEss 11.5KB 11.7KB +267.0B

Copy link
Contributor

@kapral18 kapral18 left a comment

Choose a reason for hiding this comment

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

LGTM

@PhilippeOberti PhilippeOberti merged commit dcd8e0c into elastic:main Oct 22, 2024
54 checks passed
@PhilippeOberti PhilippeOberti deleted the notes-managment-user-license branch October 22, 2024 13:32
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11461333109

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.x

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 Oct 22, 2024
…ect license in notes management page (#197149) (#197244)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Security Solution][Notes] - fix user filter not checking correct
license in notes management page
(#197149)](#197149)

<!--- 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-10-22T13:32:48Z","message":"[Security
Solution][Notes] - fix user filter not checking correct license in notes
management page
(#197149)","sha":"dcd8e0c614183ae648e00979eb82123656076d16","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat
Hunting:Investigations","v8.16.0"],"title":"[Security Solution][Notes] -
fix user filter not checking correct license in notes management
page","number":197149,"url":"https://github.com/elastic/kibana/pull/197149","mergeCommit":{"message":"[Security
Solution][Notes] - fix user filter not checking correct license in notes
management page
(#197149)","sha":"dcd8e0c614183ae648e00979eb82123656076d16"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197149","number":197149,"mergeCommit":{"message":"[Security
Solution][Notes] - fix user filter not checking correct license in notes
management page
(#197149)","sha":"dcd8e0c614183ae648e00979eb82123656076d16"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Philippe Oberti <[email protected]>
kibanamachine added a commit that referenced this pull request Oct 22, 2024
…ct license in notes management page (#197149) (#197245)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution][Notes] - fix user filter not checking correct
license in notes management page
(#197149)](#197149)

<!--- 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-10-22T13:32:48Z","message":"[Security
Solution][Notes] - fix user filter not checking correct license in notes
management page
(#197149)","sha":"dcd8e0c614183ae648e00979eb82123656076d16","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat
Hunting:Investigations","v8.16.0"],"title":"[Security Solution][Notes] -
fix user filter not checking correct license in notes management
page","number":197149,"url":"https://github.com/elastic/kibana/pull/197149","mergeCommit":{"message":"[Security
Solution][Notes] - fix user filter not checking correct license in notes
management page
(#197149)","sha":"dcd8e0c614183ae648e00979eb82123656076d16"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197149","number":197149,"mergeCommit":{"message":"[Security
Solution][Notes] - fix user filter not checking correct license in notes
management page
(#197149)","sha":"dcd8e0c614183ae648e00979eb82123656076d16"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Philippe Oberti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Investigations Team v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants