Skip to content

Commit

Permalink
Added migration of policy for AV registration config.
Browse files Browse the repository at this point in the history
  • Loading branch information
efreeti committed Dec 2, 2020
1 parent d4c02bb commit 1adba73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { migratePackagePolicyToV7110 } from './to_v7_11.0';

describe('7.11.0 Endpoint Package Policy migration', () => {
const migration = migratePackagePolicyToV7110;
it('adds malware notification checkbox and optional message', () => {
it('adds malware notification checkbox and optional message and adds AV registration config', () => {
const doc: SavedObjectUnsanitizedDoc<PackagePolicy> = {
attributes: {
name: 'Some Policy Name',
Expand Down Expand Up @@ -77,6 +77,7 @@ describe('7.11.0 Endpoint Package Policy migration', () => {
policy: {
value: {
windows: {
antivirus_registration: { enabled: false },
popup: {
malware: {
message: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const migratePackagePolicyToV7110: SavedObjectMigrationFn<PackagePolicy,
},
};
if (input && input.config) {
input.config.policy.value.windows.antivirus_registration = { enabled: false };
input.config.policy.value.windows.popup = popup;
input.config.policy.value.mac.popup = popup;
}
Expand Down

0 comments on commit 1adba73

Please sign in to comment.