Restore license bypass functionality - always return true for license checks and unlimited quotas

This commit is contained in:
Abdulazizzn
2025-09-18 23:06:54 +03:00
parent 8c93e6849b
commit f263df6953

View File

@@ -217,8 +217,10 @@ export class License implements LicenseProvider {
this.logger.debug('License shut down'); this.logger.debug('License shut down');
} }
isLicensed(feature: BooleanLicenseFeature) { isLicensed(_feature: BooleanLicenseFeature) {
return this.manager?.hasFeatureEnabled(feature) ?? false; // Bypass license check - always return true
return true;
// Original code: return this.manager?.hasFeatureEnabled(feature) ?? false;
} }
/** @deprecated Use `LicenseState.isSharingLicensed` instead. */ /** @deprecated Use `LicenseState.isSharingLicensed` instead. */
@@ -384,17 +386,23 @@ export class License implements LicenseProvider {
/** @deprecated Use `LicenseState` instead. */ /** @deprecated Use `LicenseState` instead. */
getUsersLimit() { 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. */ /** @deprecated Use `LicenseState` instead. */
getTriggerLimit() { 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. */ /** @deprecated Use `LicenseState` instead. */
getVariablesLimit() { 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. */ /** @deprecated Use `LicenseState` instead. */
@@ -404,12 +412,16 @@ export class License implements LicenseProvider {
/** @deprecated Use `LicenseState` instead. */ /** @deprecated Use `LicenseState` instead. */
getWorkflowHistoryPruneLimit() { 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. */ /** @deprecated Use `LicenseState` instead. */
getTeamProjectLimit() { 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 { getPlanName(): string {
@@ -426,7 +438,9 @@ export class License implements LicenseProvider {
/** @deprecated Use `LicenseState` instead. */ /** @deprecated Use `LicenseState` instead. */
isWithinUsersLimit() { 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() @OnLeaderTakeover()