diff --git a/x-pack/plugins/security_solution/common/endpoint/types/index.ts b/x-pack/plugins/security_solution/common/endpoint/types/index.ts index 3a4173bf43982..7eed9b47fb2d3 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/index.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/index.ts @@ -1000,7 +1000,7 @@ export interface PolicyConfig { }; }; antivirus_registration: { - mode?: AntivirusRegistrationModes; + mode: AntivirusRegistrationModes; enabled: boolean; }; attack_surface_reduction: { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/cards/antivirus_registration_card.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/cards/antivirus_registration_card.test.tsx index 714c184e48c09..7d29148aeccb6 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/cards/antivirus_registration_card.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/cards/antivirus_registration_card.test.tsx @@ -169,28 +169,4 @@ describe('Policy Form Antivirus Registration Card', () => { expect(getRadioButton(antivirusTestSubj.syncRadioButton).checked).toBe(true); }); }); - - describe('when antivirus_registration.mode is not available (serverless rollout)', () => { - beforeEach(() => { - delete formProps.policy.windows.antivirus_registration.mode; - }); - - it('should show disabled if `antivirus_registration.enabled` is false', () => { - formProps.policy.windows.antivirus_registration.enabled = false; - render(); - - expect(getRadioButton(antivirusTestSubj.disabledRadioButton).checked).toBe(true); - expect(getRadioButton(antivirusTestSubj.enabledRadioButton).checked).toBe(false); - expect(getRadioButton(antivirusTestSubj.syncRadioButton).checked).toBe(false); - }); - - it('should show enabled if `antivirus_registration.enabled` is true', () => { - formProps.policy.windows.antivirus_registration.enabled = true; - render(); - - expect(getRadioButton(antivirusTestSubj.disabledRadioButton).checked).toBe(false); - expect(getRadioButton(antivirusTestSubj.enabledRadioButton).checked).toBe(true); - expect(getRadioButton(antivirusTestSubj.syncRadioButton).checked).toBe(false); - }); - }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/cards/antivirus_registration_card.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/cards/antivirus_registration_card.tsx index 3c36a42fead11..f8f4589ee74f1 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/cards/antivirus_registration_card.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/cards/antivirus_registration_card.tsx @@ -51,15 +51,7 @@ export const AntivirusRegistrationCard = memo( const getTestId = useTestIdGenerator(dataTestSubj); const isProtectionsAllowed = !useGetProtectionsUnavailableComponent(); const isEditMode = mode === 'edit'; - - let currentMode: AntivirusRegistrationModes; - if (policy.windows.antivirus_registration.mode) { - currentMode = policy.windows.antivirus_registration.mode; - } else { - currentMode = policy.windows.antivirus_registration.enabled - ? AntivirusRegistrationModes.enabled - : AntivirusRegistrationModes.disabled; - } + const currentMode = policy.windows.antivirus_registration.mode; const labels: Record = useMemo( () => ({