diff --git a/packages/cli/src/Interfaces.ts b/packages/cli/src/Interfaces.ts index cd3738815b..f5838df115 100644 --- a/packages/cli/src/Interfaces.ts +++ b/packages/cli/src/Interfaces.ts @@ -348,6 +348,7 @@ export interface IDiagnosticInfo { smtp_set_up: boolean; ldap_allowed: boolean; saml_enabled: boolean; + binary_data_s3: boolean; licensePlanName?: string; licenseTenantId?: number; } diff --git a/packages/cli/src/License.ts b/packages/cli/src/License.ts index f90443d48a..920bb1a739 100644 --- a/packages/cli/src/License.ts +++ b/packages/cli/src/License.ts @@ -191,6 +191,10 @@ export class License { return this.isFeatureEnabled(LICENSE_FEATURES.DEBUG_IN_EDITOR); } + isBinaryDataS3Licensed() { + return this.isFeatureEnabled(LICENSE_FEATURES.BINARY_DATA_S3); + } + isVariablesEnabled() { return this.isFeatureEnabled(LICENSE_FEATURES.VARIABLES); } diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index 1ac17c4b30..bcb1d68899 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -219,6 +219,11 @@ export class Server extends AbstractServer { const cpus = os.cpus(); const binaryDataConfig = config.getEnv('binaryDataManager'); + + const isS3Selected = config.getEnv('binaryDataManager.mode') === 's3'; + const isS3Available = config.getEnv('binaryDataManager.availableModes').includes('s3'); + const isS3Licensed = Container.get(License).isBinaryDataS3Licensed(); + const diagnosticInfo: IDiagnosticInfo = { databaseType: config.getEnv('database.type'), disableProductionWebhooksOnMainProcess: config.getEnv( @@ -257,6 +262,7 @@ export class Server extends AbstractServer { smtp_set_up: config.getEnv('userManagement.emails.mode') === 'smtp', ldap_allowed: isLdapCurrentAuthenticationMethod(), saml_enabled: isSamlCurrentAuthenticationMethod(), + binary_data_s3: isS3Available && isS3Selected && isS3Licensed, licensePlanName: Container.get(License).getPlanName(), licenseTenantId: config.getEnv('license.tenantId'), }; diff --git a/packages/cli/src/services/frontend.service.ts b/packages/cli/src/services/frontend.service.ts index 3fdc5eef61..d4224fee8d 100644 --- a/packages/cli/src/services/frontend.service.ts +++ b/packages/cli/src/services/frontend.service.ts @@ -155,6 +155,7 @@ export class FrontendService { externalSecrets: false, showNonProdBanner: false, debugInEditor: false, + binaryDataS3: false, workflowHistory: false, }, mfa: { @@ -224,6 +225,10 @@ export class FrontendService { this.settings.banners.dismissed = dismissedBanners; + const isS3Selected = config.getEnv('binaryDataManager.mode') === 's3'; + const isS3Available = config.getEnv('binaryDataManager.availableModes').includes('s3'); + const isS3Licensed = this.license.isBinaryDataS3Licensed(); + // refresh enterprise status Object.assign(this.settings.enterprise, { sharing: this.license.isSharingEnabled(), @@ -236,6 +241,7 @@ export class FrontendService { externalSecrets: this.license.isExternalSecretsEnabled(), showNonProdBanner: this.license.isFeatureEnabled(LICENSE_FEATURES.SHOW_NON_PROD_BANNER), debugInEditor: this.license.isDebugInEditorLicensed(), + binaryDataS3: isS3Available && isS3Selected && isS3Licensed, workflowHistory: this.license.isWorkflowHistoryLicensed() && config.getEnv('workflowHistory.enabled'), }); diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index e928b0d6c4..595b4b65f2 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -2300,6 +2300,7 @@ export interface IN8nUISettings { externalSecrets: boolean; showNonProdBanner: boolean; debugInEditor: boolean; + binaryDataS3: boolean; workflowHistory: boolean; }; hideUsagePage: boolean;