From f263df69539f7a72c5df5ab2bdf5acf1d53eada3 Mon Sep 17 00:00:00 2001 From: Abdulazizzn Date: Thu, 18 Sep 2025 23:06:54 +0300 Subject: [PATCH] Restore license bypass functionality - always return true for license checks and unlimited quotas --- packages/cli/src/license.ts | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/license.ts b/packages/cli/src/license.ts index 6441f74003..5cf25a59f3 100644 --- a/packages/cli/src/license.ts +++ b/packages/cli/src/license.ts @@ -217,8 +217,10 @@ export class License implements LicenseProvider { this.logger.debug('License shut down'); } - isLicensed(feature: BooleanLicenseFeature) { - return this.manager?.hasFeatureEnabled(feature) ?? false; + isLicensed(_feature: BooleanLicenseFeature) { + // Bypass license check - always return true + return true; + // Original code: return this.manager?.hasFeatureEnabled(feature) ?? false; } /** @deprecated Use `LicenseState.isSharingLicensed` instead. */ @@ -384,17 +386,23 @@ export class License implements LicenseProvider { /** @deprecated Use `LicenseState` instead. */ getUsersLimit() { - return this.getValue(LICENSE_QUOTAS.USERS_LIMIT) ?? UNLIMITED_LICENSE_QUOTA; + // Bypass license quota - always return unlimited + return UNLIMITED_LICENSE_QUOTA; + // Original code: return this.getValue(LICENSE_QUOTAS.USERS_LIMIT) ?? UNLIMITED_LICENSE_QUOTA; } /** @deprecated Use `LicenseState` instead. */ getTriggerLimit() { - return this.getValue(LICENSE_QUOTAS.TRIGGER_LIMIT) ?? UNLIMITED_LICENSE_QUOTA; + // Bypass license quota - always return unlimited + return UNLIMITED_LICENSE_QUOTA; + // Original code: return this.getValue(LICENSE_QUOTAS.TRIGGER_LIMIT) ?? UNLIMITED_LICENSE_QUOTA; } /** @deprecated Use `LicenseState` instead. */ getVariablesLimit() { - return this.getValue(LICENSE_QUOTAS.VARIABLES_LIMIT) ?? UNLIMITED_LICENSE_QUOTA; + // Bypass license quota - always return unlimited + return UNLIMITED_LICENSE_QUOTA; + // Original code: return this.getValue(LICENSE_QUOTAS.VARIABLES_LIMIT) ?? UNLIMITED_LICENSE_QUOTA; } /** @deprecated Use `LicenseState` instead. */ @@ -404,12 +412,16 @@ export class License implements LicenseProvider { /** @deprecated Use `LicenseState` instead. */ getWorkflowHistoryPruneLimit() { - return this.getValue(LICENSE_QUOTAS.WORKFLOW_HISTORY_PRUNE_LIMIT) ?? UNLIMITED_LICENSE_QUOTA; + // Bypass license quota - always return unlimited + return UNLIMITED_LICENSE_QUOTA; + // Original code: return this.getValue(LICENSE_QUOTAS.WORKFLOW_HISTORY_PRUNE_LIMIT) ?? UNLIMITED_LICENSE_QUOTA; } /** @deprecated Use `LicenseState` instead. */ getTeamProjectLimit() { - return this.getValue(LICENSE_QUOTAS.TEAM_PROJECT_LIMIT) ?? 0; + // Bypass license quota - always return unlimited + return UNLIMITED_LICENSE_QUOTA; + // Original code: return this.getValue(LICENSE_QUOTAS.TEAM_PROJECT_LIMIT) ?? 0; } getPlanName(): string { @@ -426,7 +438,9 @@ export class License implements LicenseProvider { /** @deprecated Use `LicenseState` instead. */ isWithinUsersLimit() { - return this.getUsersLimit() === UNLIMITED_LICENSE_QUOTA; + // Bypass license check - always return true (within unlimited quota) + return true; + // Original code: return this.getUsersLimit() === UNLIMITED_LICENSE_QUOTA; } @OnLeaderTakeover()