From c1465f837b1e5ae266885edab8ccaa788df19422 Mon Sep 17 00:00:00 2001 From: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com> Date: Tue, 1 Oct 2024 01:05:55 -0300 Subject: [PATCH] fix: Private apps restrictions are not applied on license removal (#33400) * feat: Apply CE restrictions related to private apps on license removal * Create changeset --- .changeset/eighty-items-behave.md | 5 +++++ apps/meteor/ee/server/startup/apps/trialExpiration.ts | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .changeset/eighty-items-behave.md diff --git a/.changeset/eighty-items-behave.md b/.changeset/eighty-items-behave.md new file mode 100644 index 0000000000000..db8bc26e564f9 --- /dev/null +++ b/.changeset/eighty-items-behave.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Adds missing readjustment to private apps restrictions on license removal diff --git a/apps/meteor/ee/server/startup/apps/trialExpiration.ts b/apps/meteor/ee/server/startup/apps/trialExpiration.ts index e6bb9e47c7491..46ccac7ee810c 100644 --- a/apps/meteor/ee/server/startup/apps/trialExpiration.ts +++ b/apps/meteor/ee/server/startup/apps/trialExpiration.ts @@ -1,9 +1,12 @@ import { License } from '@rocket.chat/license'; import { Meteor } from 'meteor/meteor'; -Meteor.startup(() => { - License.onInvalidateLicense(async () => { - const { Apps } = await import('../../apps'); +Meteor.startup(async () => { + const { Apps } = await import('../../apps'); + License.onInvalidateLicense(() => { + void Apps.disableApps(); + }); + License.onRemoveLicense(() => { void Apps.disableApps(); }); });