From 419969c0d761b1ac7870e7821c0398ecfca1f0ce Mon Sep 17 00:00:00 2001 From: Michael Auerswald Date: Tue, 7 Mar 2023 18:35:52 +0100 Subject: [PATCH] fix(core): Rename advancedFilters to advancedExecutionFilters (#5643) rename advancedFilters to advancedExecutionFilters --- packages/cli/src/Interfaces.ts | 2 +- packages/cli/src/License.ts | 4 ++-- packages/cli/src/Server.ts | 6 +++--- packages/cli/src/config/schema.ts | 2 +- packages/cli/src/constants.ts | 2 +- packages/cli/src/executions/executionHelpers.ts | 7 +++++-- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/cli/src/Interfaces.ts b/packages/cli/src/Interfaces.ts index 94cfa094c6..d801e5e3cc 100644 --- a/packages/cli/src/Interfaces.ts +++ b/packages/cli/src/Interfaces.ts @@ -524,7 +524,7 @@ export interface IN8nUISettings { ldap: boolean; saml: boolean; logStreaming: boolean; - advancedFilters: boolean; + advancedExecutionFilters: boolean; }; hideUsagePage: boolean; license: { diff --git a/packages/cli/src/License.ts b/packages/cli/src/License.ts index 1a5d5a6122..35ed836060 100644 --- a/packages/cli/src/License.ts +++ b/packages/cli/src/License.ts @@ -106,8 +106,8 @@ export class License { return this.isFeatureEnabled(LICENSE_FEATURES.SAML); } - isAdvancedFiltersEnabled() { - return this.isFeatureEnabled(LICENSE_FEATURES.ADVANCED_FILTERS); + isAdvancedExecutionFiltersEnabled() { + return this.isFeatureEnabled(LICENSE_FEATURES.ADVANCED_EXECUTION_FILTERS); } getCurrentEntitlements() { diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index af05fcbdec..92e81161d3 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -146,7 +146,7 @@ import { Container } from 'typedi'; import { InternalHooks } from './InternalHooks'; import { getStatusUsingPreviousExecutionStatusMethod, - isAdvancedFiltersEnabled, + isAdvancedExecutionFiltersEnabled, } from './executions/executionHelpers'; import { getSamlLoginLabel, isSamlLoginEnabled, isSamlLicensed } from './sso/saml/samlHelpers'; import { samlControllerPublic } from './sso/saml/routes/saml.controller.public.ee'; @@ -303,7 +303,7 @@ class Server extends AbstractServer { ldap: false, saml: false, logStreaming: config.getEnv('enterprise.features.logStreaming'), - advancedFilters: config.getEnv('enterprise.features.advancedFilters'), + advancedExecutionFilters: config.getEnv('enterprise.features.advancedExecutionFilters'), }, hideUsagePage: config.getEnv('hideUsagePage'), license: { @@ -332,7 +332,7 @@ class Server extends AbstractServer { logStreaming: isLogStreamingEnabled(), ldap: isLdapEnabled(), saml: isSamlLicensed(), - advancedFilters: isAdvancedFiltersEnabled(), + advancedExecutionFilters: isAdvancedExecutionFiltersEnabled(), }); if (isLdapEnabled()) { diff --git a/packages/cli/src/config/schema.ts b/packages/cli/src/config/schema.ts index fab6d8bcf6..5d9cb40045 100644 --- a/packages/cli/src/config/schema.ts +++ b/packages/cli/src/config/schema.ts @@ -1008,7 +1008,7 @@ export const schema = { format: Boolean, default: false, }, - advancedFilters: { + advancedExecutionFilters: { format: Boolean, default: false, }, diff --git a/packages/cli/src/constants.ts b/packages/cli/src/constants.ts index 141d33f80a..2a984afb54 100644 --- a/packages/cli/src/constants.ts +++ b/packages/cli/src/constants.ts @@ -72,7 +72,7 @@ export enum LICENSE_FEATURES { LDAP = 'feat:ldap', SAML = 'feat:saml', LOG_STREAMING = 'feat:logStreaming', - ADVANCED_FILTERS = 'feat:advancedFilters', + ADVANCED_EXECUTION_FILTERS = 'feat:advancedExecutionFilters', } export const CREDENTIAL_BLANKING_VALUE = '__n8n_BLANK_VALUE_e5362baf-c777-4d57-a609-6eaf1f9e87f6'; diff --git a/packages/cli/src/executions/executionHelpers.ts b/packages/cli/src/executions/executionHelpers.ts index 4e44953907..b6fe81e1f1 100644 --- a/packages/cli/src/executions/executionHelpers.ts +++ b/packages/cli/src/executions/executionHelpers.ts @@ -19,7 +19,10 @@ export function getStatusUsingPreviousExecutionStatusMethod( } } -export function isAdvancedFiltersEnabled(): boolean { +export function isAdvancedExecutionFiltersEnabled(): boolean { const license = getLicense(); - return config.getEnv('enterprise.features.advancedFilters') || license.isAdvancedFiltersEnabled(); + return ( + config.getEnv('enterprise.features.advancedExecutionFilters') || + license.isAdvancedExecutionFiltersEnabled() + ); }