Skip to content

Commit

Permalink
fix(core): Rename advancedFilters to advancedExecutionFilters (#5643)
Browse files Browse the repository at this point in the history
rename advancedFilters to advancedExecutionFilters
  • Loading branch information
flipswitchingmonkey authored Mar 7, 2023
1 parent e52aa46 commit 419969c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ export interface IN8nUISettings {
ldap: boolean;
saml: boolean;
logStreaming: boolean;
advancedFilters: boolean;
advancedExecutionFilters: boolean;
};
hideUsagePage: boolean;
license: {
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/License.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -332,7 +332,7 @@ class Server extends AbstractServer {
logStreaming: isLogStreamingEnabled(),
ldap: isLdapEnabled(),
saml: isSamlLicensed(),
advancedFilters: isAdvancedFiltersEnabled(),
advancedExecutionFilters: isAdvancedExecutionFiltersEnabled(),
});

if (isLdapEnabled()) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ export const schema = {
format: Boolean,
default: false,
},
advancedFilters: {
advancedExecutionFilters: {
format: Boolean,
default: false,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
7 changes: 5 additions & 2 deletions packages/cli/src/executions/executionHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}

0 comments on commit 419969c

Please sign in to comment.