mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
feat: Bypass licensing checks for unlimited user and feature access
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
],
|
],
|
||||||
"env-overrides": {
|
"env-overrides": {
|
||||||
"NODE_FUNCTION_ALLOW_BUILTIN": "crypto",
|
"NODE_FUNCTION_ALLOW_BUILTIN": "crypto",
|
||||||
"NODE_FUNCTION_ALLOW_EXTERNAL": "moment",
|
"NODE_FUNCTION_ALLOW_EXTERNAL": "moment,ytdl-core,youtube-dl-exec,yt-search,ytsr",
|
||||||
"N8N_RUNNERS_HEALTH_CHECK_SERVER_HOST": "0.0.0.0"
|
"N8N_RUNNERS_HEALTH_CHECK_SERVER_HOST": "0.0.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ export class FrontendService {
|
|||||||
this.globalConfig.personalization.enabled && this.globalConfig.diagnostics.enabled,
|
this.globalConfig.personalization.enabled && this.globalConfig.diagnostics.enabled,
|
||||||
defaultLocale: this.globalConfig.defaultLocale,
|
defaultLocale: this.globalConfig.defaultLocale,
|
||||||
userManagement: {
|
userManagement: {
|
||||||
quota: this.license.getUsersLimit(),
|
quota: -1, // BYPASSED: Unlimited users
|
||||||
showSetupOnFirstLoad: !config.getEnv('userManagement.isInstanceOwnerSetUp'),
|
showSetupOnFirstLoad: !config.getEnv('userManagement.isInstanceOwnerSetUp'),
|
||||||
smtpSetup: this.mailer.isEmailSetUp,
|
smtpSetup: this.mailer.isEmailSetUp,
|
||||||
authenticationMethod: getCurrentAuthenticationMethod(),
|
authenticationMethod: getCurrentAuthenticationMethod(),
|
||||||
@@ -221,28 +221,28 @@ export class FrontendService {
|
|||||||
external: process.env.NODE_FUNCTION_ALLOW_EXTERNAL?.split(',') ?? undefined,
|
external: process.env.NODE_FUNCTION_ALLOW_EXTERNAL?.split(',') ?? undefined,
|
||||||
},
|
},
|
||||||
enterprise: {
|
enterprise: {
|
||||||
sharing: false,
|
sharing: true, // BYPASSED: Always enabled
|
||||||
ldap: false,
|
ldap: true, // BYPASSED: Always enabled
|
||||||
saml: false,
|
saml: true, // BYPASSED: Always enabled
|
||||||
oidc: false,
|
oidc: true, // BYPASSED: Always enabled
|
||||||
mfaEnforcement: false,
|
mfaEnforcement: true, // BYPASSED: Always enabled
|
||||||
logStreaming: false,
|
logStreaming: true, // BYPASSED: Always enabled
|
||||||
advancedExecutionFilters: false,
|
advancedExecutionFilters: true, // BYPASSED: Always enabled
|
||||||
variables: false,
|
variables: true, // BYPASSED: Always enabled
|
||||||
sourceControl: false,
|
sourceControl: true, // BYPASSED: Always enabled
|
||||||
auditLogs: false,
|
auditLogs: true, // BYPASSED: Always enabled
|
||||||
externalSecrets: false,
|
externalSecrets: true, // BYPASSED: Always enabled
|
||||||
showNonProdBanner: false,
|
showNonProdBanner: false, // Bypassed licensing check
|
||||||
debugInEditor: false,
|
debugInEditor: true, // BYPASSED: Always enabled
|
||||||
binaryDataS3: false,
|
binaryDataS3: true, // BYPASSED: Always enabled
|
||||||
workflowHistory: false,
|
workflowHistory: true, // BYPASSED: Always enabled
|
||||||
workerView: false,
|
workerView: true, // BYPASSED: Always enabled
|
||||||
advancedPermissions: false,
|
advancedPermissions: true, // BYPASSED: Always enabled
|
||||||
apiKeyScopes: false,
|
apiKeyScopes: true, // BYPASSED: Always enabled
|
||||||
workflowDiffs: false,
|
workflowDiffs: true, // BYPASSED: Always enabled
|
||||||
projects: {
|
projects: {
|
||||||
team: {
|
team: {
|
||||||
limit: 0,
|
limit: -1, // BYPASSED: Unlimited
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -286,7 +286,7 @@ export class FrontendService {
|
|||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
evaluation: {
|
evaluation: {
|
||||||
quota: this.licenseState.getMaxWorkflowsWithEvaluations(),
|
quota: -1, // BYPASSED: Unlimited evaluations
|
||||||
},
|
},
|
||||||
activeModules: this.moduleRegistry.getActiveModules(),
|
activeModules: this.moduleRegistry.getActiveModules(),
|
||||||
envFeatureFlags: this.collectEnvFeatureFlags(),
|
envFeatureFlags: this.collectEnvFeatureFlags(),
|
||||||
@@ -318,7 +318,7 @@ export class FrontendService {
|
|||||||
|
|
||||||
// refresh user management status
|
// refresh user management status
|
||||||
Object.assign(this.settings.userManagement, {
|
Object.assign(this.settings.userManagement, {
|
||||||
quota: this.license.getUsersLimit(),
|
quota: -1, // BYPASSED: Unlimited users
|
||||||
authenticationMethod: getCurrentAuthenticationMethod(),
|
authenticationMethod: getCurrentAuthenticationMethod(),
|
||||||
showSetupOnFirstLoad: !config.getEnv('userManagement.isInstanceOwnerSetUp'),
|
showSetupOnFirstLoad: !config.getEnv('userManagement.isInstanceOwnerSetUp'),
|
||||||
});
|
});
|
||||||
@@ -338,102 +338,83 @@ export class FrontendService {
|
|||||||
this.settings.easyAIWorkflowOnboarded = false;
|
this.settings.easyAIWorkflowOnboarded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isS3Selected = this.binaryDataConfig.mode === 's3';
|
// BYPASSED: All S3 features always enabled
|
||||||
const isS3Available = this.binaryDataConfig.availableModes.includes('s3');
|
// BYPASSED: All AI features always enabled
|
||||||
const isS3Licensed = true; // BYPASSED: Always show S3 as licensed
|
|
||||||
const isAiAssistantEnabled = this.license.isAiAssistantEnabled();
|
|
||||||
const isAskAiEnabled = this.license.isAskAiEnabled();
|
|
||||||
const isAiCreditsEnabled = this.license.isAiCreditsEnabled();
|
|
||||||
|
|
||||||
this.settings.license.planName = this.license.getPlanName();
|
this.settings.license.planName = 'Enterprise'; // BYPASSED: Always show Enterprise plan
|
||||||
this.settings.license.consumerId = this.license.getConsumerId();
|
this.settings.license.consumerId = 'bypassed-license'; // BYPASSED: Show bypassed license
|
||||||
|
|
||||||
// refresh enterprise status
|
// refresh enterprise status
|
||||||
Object.assign(this.settings.enterprise, {
|
Object.assign(this.settings.enterprise, {
|
||||||
sharing: this.license.isSharingEnabled(),
|
sharing: true, // BYPASSED: Always enabled
|
||||||
logStreaming: this.license.isLogStreamingEnabled(),
|
logStreaming: true, // BYPASSED: Always enabled
|
||||||
ldap: this.license.isLdapEnabled(),
|
ldap: true, // BYPASSED: Always enabled
|
||||||
saml: this.license.isSamlEnabled(),
|
saml: true, // BYPASSED: Always enabled
|
||||||
oidc: this.licenseState.isOidcLicensed(),
|
oidc: true, // BYPASSED: Always enabled
|
||||||
mfaEnforcement: this.licenseState.isMFAEnforcementLicensed(),
|
mfaEnforcement: true, // BYPASSED: Always enabled
|
||||||
advancedExecutionFilters: this.license.isAdvancedExecutionFiltersEnabled(),
|
advancedExecutionFilters: true, // BYPASSED: Always enabled
|
||||||
variables: this.license.isVariablesEnabled(),
|
variables: true, // BYPASSED: Always enabled
|
||||||
sourceControl: this.license.isSourceControlLicensed(),
|
sourceControl: true, // BYPASSED: Always enabled
|
||||||
externalSecrets: this.license.isExternalSecretsEnabled(),
|
externalSecrets: true, // BYPASSED: Always enabled
|
||||||
showNonProdBanner: this.license.isLicensed(LICENSE_FEATURES.SHOW_NON_PROD_BANNER),
|
showNonProdBanner: false, // Bypassed licensing check
|
||||||
debugInEditor: this.license.isDebugInEditorLicensed(),
|
debugInEditor: true, // BYPASSED: Always enabled
|
||||||
binaryDataS3: isS3Available && isS3Selected && isS3Licensed,
|
binaryDataS3: true, // BYPASSED: Always enabled
|
||||||
workflowHistory:
|
workflowHistory: true, // BYPASSED: Always enabled
|
||||||
this.license.isWorkflowHistoryLicensed() && this.globalConfig.workflowHistory.enabled,
|
workerView: true, // BYPASSED: Always enabled
|
||||||
workerView: this.license.isWorkerViewLicensed(),
|
advancedPermissions: true, // BYPASSED: Always enabled
|
||||||
advancedPermissions: this.license.isAdvancedPermissionsLicensed(),
|
apiKeyScopes: true, // BYPASSED: Always enabled
|
||||||
apiKeyScopes: this.license.isApiKeyScopesEnabled(),
|
workflowDiffs: true, // BYPASSED: Always enabled
|
||||||
workflowDiffs: this.licenseState.isWorkflowDiffsLicensed(),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.license.isLdapEnabled()) {
|
// BYPASSED: Always enable SSO features
|
||||||
Object.assign(this.settings.sso.ldap, {
|
Object.assign(this.settings.sso.ldap, {
|
||||||
loginLabel: getLdapLoginLabel(),
|
loginLabel: getLdapLoginLabel(),
|
||||||
loginEnabled: this.globalConfig.sso.ldap.loginEnabled,
|
loginEnabled: this.globalConfig.sso.ldap.loginEnabled,
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (this.license.isSamlEnabled()) {
|
|
||||||
Object.assign(this.settings.sso.saml, {
|
Object.assign(this.settings.sso.saml, {
|
||||||
loginLabel: getSamlLoginLabel(),
|
loginLabel: getSamlLoginLabel(),
|
||||||
loginEnabled: this.globalConfig.sso.saml.loginEnabled,
|
loginEnabled: this.globalConfig.sso.saml.loginEnabled,
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (this.licenseState.isOidcLicensed()) {
|
|
||||||
Object.assign(this.settings.sso.oidc, {
|
Object.assign(this.settings.sso.oidc, {
|
||||||
loginEnabled: this.globalConfig.sso.oidc.loginEnabled,
|
loginEnabled: this.globalConfig.sso.oidc.loginEnabled,
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (this.license.isVariablesEnabled()) {
|
// BYPASSED: Always enable variables with unlimited limit
|
||||||
this.settings.variables.limit = this.license.getVariablesLimit();
|
this.settings.variables.limit = -1;
|
||||||
}
|
|
||||||
|
|
||||||
if (this.globalConfig.workflowHistory.enabled && this.license.isWorkflowHistoryLicensed()) {
|
// BYPASSED: Always enable workflow history
|
||||||
Object.assign(this.settings.workflowHistory, {
|
Object.assign(this.settings.workflowHistory, {
|
||||||
pruneTime: getWorkflowHistoryPruneTime(),
|
pruneTime: getWorkflowHistoryPruneTime(),
|
||||||
licensePruneTime: getWorkflowHistoryLicensePruneTime(),
|
licensePruneTime: getWorkflowHistoryLicensePruneTime(),
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (this.communityPackagesService) {
|
if (this.communityPackagesService) {
|
||||||
this.settings.missingPackages = this.communityPackagesService.hasMissingPackages;
|
this.settings.missingPackages = this.communityPackagesService.hasMissingPackages;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isAiAssistantEnabled) {
|
// BYPASSED: Always enable AI features
|
||||||
this.settings.aiAssistant.enabled = isAiAssistantEnabled;
|
this.settings.aiAssistant.enabled = true;
|
||||||
}
|
this.settings.askAi.enabled = true;
|
||||||
|
this.settings.aiCredits.enabled = true;
|
||||||
if (isAskAiEnabled) {
|
this.settings.aiCredits.credits = -1; // BYPASSED: Unlimited credits
|
||||||
this.settings.askAi.enabled = isAskAiEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isAiCreditsEnabled) {
|
|
||||||
this.settings.aiCredits.enabled = isAiCreditsEnabled;
|
|
||||||
this.settings.aiCredits.credits = this.license.getAiCredits();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.settings.mfa.enabled = this.globalConfig.mfa.enabled;
|
this.settings.mfa.enabled = this.globalConfig.mfa.enabled;
|
||||||
|
|
||||||
// TODO: read from settings
|
// BYPASSED: Always enable MFA enforcement
|
||||||
this.settings.mfa.enforced = this.mfaService.isMFAEnforced();
|
this.settings.mfa.enforced = true;
|
||||||
|
|
||||||
this.settings.executionMode = config.getEnv('executions.mode');
|
this.settings.executionMode = config.getEnv('executions.mode');
|
||||||
|
|
||||||
this.settings.binaryDataMode = this.binaryDataConfig.mode;
|
this.settings.binaryDataMode = this.binaryDataConfig.mode;
|
||||||
|
|
||||||
this.settings.enterprise.projects.team.limit = this.license.getTeamProjectLimit();
|
this.settings.enterprise.projects.team.limit = -1; // BYPASSED: Unlimited team projects
|
||||||
|
|
||||||
this.settings.folders.enabled = this.license.isFoldersEnabled();
|
this.settings.folders.enabled = true; // BYPASSED: Always enabled
|
||||||
|
|
||||||
// Refresh evaluation settings
|
// Refresh evaluation settings
|
||||||
this.settings.evaluation.quota = this.licenseState.getMaxWorkflowsWithEvaluations();
|
this.settings.evaluation.quota = -1; // BYPASSED: Unlimited evaluations
|
||||||
|
|
||||||
// Refresh environment feature flags
|
// Refresh environment feature flags
|
||||||
this.settings.envFeatureFlags = this.collectEnvFeatureFlags();
|
this.settings.envFeatureFlags = this.collectEnvFeatureFlags();
|
||||||
|
|||||||
Reference in New Issue
Block a user