[Security solution][Endpoint] Fix blocklist entries are allowed to be assigned per policy on basic license#128472
Conversation
…bal. Also check for valid form when changing policy
…o_be_assigned_per_policy_on_basic_license-128224
|
Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt) |
| const nextItem = { ...item, tags }; | ||
|
|
||
| setSelectedPolicies(change.selected); | ||
| validateValues(nextItem); |
There was a problem hiding this comment.
This fixes an error where the form was enabled for submit when changing the assignment section even there was no name or values already set.
|
|
||
| // `undefined` will cause params to be dropped from url | ||
| setUrlParams({ itemId: undefined, show: undefined }, true); | ||
| setUrlParams({ ...urlParams, itemId: undefined, show: undefined }, true); |
There was a problem hiding this comment.
keep old url params and replace the needed ones. This will keep the search and pagination params after closing the flyout
There was a problem hiding this comment.
Thanks for finding and fixing these bugs.
I found another one that I noticed while running your branch.
Switching policy assignment views makes the checks disappear.
Here's a clip.
PS.
I also notice that if I save the data on the flyout after the checkbox disappears on the policy assignment switch, it actually does save it as a global aritfact.
|
@joeypoon Did you know about this policy bug Ash has mention above? |
I was not aware, no. I can take a look at it (probably Monday). |
|
@joeypoon I'll include the fix on this pr 🙂 |
…al and went back to by policy
|
@ashokaditya @joeypoon Fixed here: |
| // Preserve old selected policies when switching to global | ||
| if (!change.isGlobal) { | ||
| setSelectedPolicies(change.selected); | ||
| } |
There was a problem hiding this comment.
Is it east enough to add a test for this bug? 🙏
There was a problem hiding this comment.
There is no test file currently for blocklist form, I think @joeypoon was working on it, is it right?
There was a problem hiding this comment.
I see. Should add the test IMHO. Later, if not in this PR.
joeypoon
left a comment
There was a problem hiding this comment.
looks good. thanks for fixing these bugs 🙏
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |


Summary
Before:

After:

For maintainers