mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
Restore license bypass functionality - always return true for license checks and unlimited quotas
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user