-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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][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) |
setSelectedPolicies(change.selected); | ||
validateValues(nextItem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -257,10 +257,10 @@ export const ArtifactFlyout = memo<ArtifactFlyoutProps>( | |||
} | |||
|
|||
// `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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it east enough to add a test for this bug? 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Should add the test IMHO. Later, if not in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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