Skip to content

Commit

Permalink
fix: seatsCap validation
Browse files Browse the repository at this point in the history
  • Loading branch information
tapiarafael committed Sep 28, 2023
1 parent b33d191 commit bfa8ab0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/meteor/ee/app/license/server/license.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ class LicenseClass {
EnterpriseLicenses.emit('invalidate');
}

async canAddNewUser(userCount = 0): Promise<boolean> {
async canAddNewUser(userCount = 1): Promise<boolean> {
if (!maxActiveUsers) {
return true;
}

return maxActiveUsers > (await Users.getActiveLocalUserCount()) + userCount;
return maxActiveUsers >= (await Users.getActiveLocalUserCount()) + userCount;
}

async canEnableApp(app: IAppStorageItem): Promise<boolean> {
Expand Down Expand Up @@ -352,7 +352,7 @@ export function getAppsConfig(): NonNullable<ILicense['apps']> {
return License.getAppsConfig();
}

export async function canAddNewUser(userCount = 0): Promise<boolean> {
export async function canAddNewUser(userCount = 1): Promise<boolean> {
return License.canAddNewUser(userCount);
}

Expand Down

0 comments on commit bfa8ab0

Please sign in to comment.