mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
feat(core): Add versionControl feature flag (#6000)
add versionControl feature flag
This commit is contained in:
parent
0c10fbc83f
commit
33299ca61a
|
@ -542,6 +542,7 @@ export interface IN8nUISettings {
|
|||
logStreaming: boolean;
|
||||
advancedExecutionFilters: boolean;
|
||||
variables: boolean;
|
||||
versionControl: boolean;
|
||||
};
|
||||
hideUsagePage: boolean;
|
||||
license: {
|
||||
|
|
|
@ -128,6 +128,10 @@ export class License {
|
|||
return this.isFeatureEnabled(LICENSE_FEATURES.VARIABLES);
|
||||
}
|
||||
|
||||
isVersionControlEnabled() {
|
||||
return this.isFeatureEnabled(LICENSE_FEATURES.VERSION_CONTROL);
|
||||
}
|
||||
|
||||
getCurrentEntitlements() {
|
||||
return this.manager?.getCurrentEntitlements() ?? [];
|
||||
}
|
||||
|
|
|
@ -160,6 +160,7 @@ import { variablesController } from './environments/variables.controller';
|
|||
import { LdapManager } from './Ldap/LdapManager.ee';
|
||||
import { getVariablesLimit, isVariablesEnabled } from '@/environments/enviromentHelpers';
|
||||
import { getCurrentAuthenticationMethod } from './sso/ssoHelpers';
|
||||
import { isVersionControlEnabled } from './environment/versionControl/versionControlHelper';
|
||||
|
||||
const exec = promisify(callbackExec);
|
||||
|
||||
|
@ -320,6 +321,7 @@ class Server extends AbstractServer {
|
|||
logStreaming: false,
|
||||
advancedExecutionFilters: false,
|
||||
variables: false,
|
||||
versionControl: false,
|
||||
},
|
||||
hideUsagePage: config.getEnv('hideUsagePage'),
|
||||
license: {
|
||||
|
@ -354,6 +356,7 @@ class Server extends AbstractServer {
|
|||
saml: isSamlLicensed(),
|
||||
advancedExecutionFilters: isAdvancedExecutionFiltersEnabled(),
|
||||
variables: isVariablesEnabled(),
|
||||
versionControl: isVersionControlEnabled(),
|
||||
});
|
||||
|
||||
if (isLdapEnabled()) {
|
||||
|
|
|
@ -29,6 +29,7 @@ const enabledFeatures = {
|
|||
[LICENSE_FEATURES.SAML]: false,
|
||||
[LICENSE_FEATURES.LOG_STREAMING]: false,
|
||||
[LICENSE_FEATURES.ADVANCED_EXECUTION_FILTERS]: false,
|
||||
[LICENSE_FEATURES.VERSION_CONTROL]: false,
|
||||
};
|
||||
|
||||
type Feature = keyof typeof enabledFeatures;
|
||||
|
|
|
@ -75,6 +75,7 @@ export enum LICENSE_FEATURES {
|
|||
LOG_STREAMING = 'feat:logStreaming',
|
||||
ADVANCED_EXECUTION_FILTERS = 'feat:advancedExecutionFilters',
|
||||
VARIABLES = 'feat:variables',
|
||||
VERSION_CONTROL = 'feat:versionControl',
|
||||
}
|
||||
|
||||
export enum LICENSE_QUOTAS {
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
import Container from 'typedi';
|
||||
import { License } from '../../License';
|
||||
|
||||
export function isVersionControlEnabled() {
|
||||
const license = Container.get(License);
|
||||
return license.isVersionControlEnabled();
|
||||
}
|
|
@ -461,6 +461,7 @@ export enum EnterpriseEditionFeature {
|
|||
LogStreaming = 'logStreaming',
|
||||
Variables = 'variables',
|
||||
Saml = 'saml',
|
||||
VersionControl = 'versionControl',
|
||||
}
|
||||
export const MAIN_NODE_PANEL_WIDTH = 360;
|
||||
|
||||
|
|
Loading…
Reference in a new issue