From bfa8ab0fb66fcace616d6ff436484e523f1e71ab Mon Sep 17 00:00:00 2001 From: Rafael Tapia Date: Thu, 28 Sep 2023 15:24:10 -0300 Subject: [PATCH] fix: seatsCap validation --- apps/meteor/ee/app/license/server/license.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/meteor/ee/app/license/server/license.ts b/apps/meteor/ee/app/license/server/license.ts index a7f51b1980ce..b7ba6b927cd0 100644 --- a/apps/meteor/ee/app/license/server/license.ts +++ b/apps/meteor/ee/app/license/server/license.ts @@ -223,12 +223,12 @@ class LicenseClass { EnterpriseLicenses.emit('invalidate'); } - async canAddNewUser(userCount = 0): Promise { + async canAddNewUser(userCount = 1): Promise { if (!maxActiveUsers) { return true; } - return maxActiveUsers > (await Users.getActiveLocalUserCount()) + userCount; + return maxActiveUsers >= (await Users.getActiveLocalUserCount()) + userCount; } async canEnableApp(app: IAppStorageItem): Promise { @@ -352,7 +352,7 @@ export function getAppsConfig(): NonNullable { return License.getAppsConfig(); } -export async function canAddNewUser(userCount = 0): Promise { +export async function canAddNewUser(userCount = 1): Promise { return License.canAddNewUser(userCount); }