mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
feat(core): Add advancedFilters feature flag (#5638)
adds advancedFilters feature flag
This commit is contained in:
parent
6c1286fadf
commit
0b5ef09e7c
|
@ -524,6 +524,7 @@ export interface IN8nUISettings {
|
|||
ldap: boolean;
|
||||
saml: boolean;
|
||||
logStreaming: boolean;
|
||||
advancedFilters: boolean;
|
||||
};
|
||||
hideUsagePage: boolean;
|
||||
license: {
|
||||
|
|
|
@ -106,6 +106,10 @@ export class License {
|
|||
return this.isFeatureEnabled(LICENSE_FEATURES.SAML);
|
||||
}
|
||||
|
||||
isAdvancedFiltersEnabled() {
|
||||
return this.isFeatureEnabled(LICENSE_FEATURES.ADVANCED_FILTERS);
|
||||
}
|
||||
|
||||
getCurrentEntitlements() {
|
||||
return this.manager?.getCurrentEntitlements() ?? [];
|
||||
}
|
||||
|
|
|
@ -144,7 +144,10 @@ import { PostHogClient } from './posthog';
|
|||
import { eventBus } from './eventbus';
|
||||
import { Container } from 'typedi';
|
||||
import { InternalHooks } from './InternalHooks';
|
||||
import { getStatusUsingPreviousExecutionStatusMethod } from './executions/executionHelpers';
|
||||
import {
|
||||
getStatusUsingPreviousExecutionStatusMethod,
|
||||
isAdvancedFiltersEnabled,
|
||||
} from './executions/executionHelpers';
|
||||
import { getSamlLoginLabel, isSamlLoginEnabled, isSamlLicensed } from './sso/saml/samlHelpers';
|
||||
import { samlControllerPublic } from './sso/saml/routes/saml.controller.public.ee';
|
||||
import { SamlService } from './sso/saml/saml.service.ee';
|
||||
|
@ -300,6 +303,7 @@ class Server extends AbstractServer {
|
|||
ldap: false,
|
||||
saml: false,
|
||||
logStreaming: config.getEnv('enterprise.features.logStreaming'),
|
||||
advancedFilters: config.getEnv('enterprise.features.advancedFilters'),
|
||||
},
|
||||
hideUsagePage: config.getEnv('hideUsagePage'),
|
||||
license: {
|
||||
|
@ -328,6 +332,7 @@ class Server extends AbstractServer {
|
|||
logStreaming: isLogStreamingEnabled(),
|
||||
ldap: isLdapEnabled(),
|
||||
saml: isSamlLicensed(),
|
||||
advancedFilters: isAdvancedFiltersEnabled(),
|
||||
});
|
||||
|
||||
if (isLdapEnabled()) {
|
||||
|
|
|
@ -1008,6 +1008,10 @@ export const schema = {
|
|||
format: Boolean,
|
||||
default: false,
|
||||
},
|
||||
advancedFilters: {
|
||||
format: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ export enum LICENSE_FEATURES {
|
|||
LDAP = 'feat:ldap',
|
||||
SAML = 'feat:saml',
|
||||
LOG_STREAMING = 'feat:logStreaming',
|
||||
ADVANCED_FILTERS = 'feat:advancedFilters',
|
||||
}
|
||||
|
||||
export const CREDENTIAL_BLANKING_VALUE = '__n8n_BLANK_VALUE_e5362baf-c777-4d57-a609-6eaf1f9e87f6';
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import type { IExecutionFlattedDb } from '../Interfaces';
|
||||
import type { IExecutionFlattedDb } from '@/Interfaces';
|
||||
import type { ExecutionStatus } from 'n8n-workflow';
|
||||
import { getLicense } from '@/License';
|
||||
import config from '@/config';
|
||||
|
||||
export function getStatusUsingPreviousExecutionStatusMethod(
|
||||
execution: IExecutionFlattedDb,
|
||||
|
@ -16,3 +18,8 @@ export function getStatusUsingPreviousExecutionStatusMethod(
|
|||
return 'unknown';
|
||||
}
|
||||
}
|
||||
|
||||
export function isAdvancedFiltersEnabled(): boolean {
|
||||
const license = getLicense();
|
||||
return config.getEnv('enterprise.features.advancedFilters') || license.isAdvancedFiltersEnabled();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue