mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-13 05:47:31 -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;
|
logStreaming: boolean;
|
||||||
advancedExecutionFilters: boolean;
|
advancedExecutionFilters: boolean;
|
||||||
variables: boolean;
|
variables: boolean;
|
||||||
|
versionControl: boolean;
|
||||||
};
|
};
|
||||||
hideUsagePage: boolean;
|
hideUsagePage: boolean;
|
||||||
license: {
|
license: {
|
||||||
|
|
|
@ -128,6 +128,10 @@ export class License {
|
||||||
return this.isFeatureEnabled(LICENSE_FEATURES.VARIABLES);
|
return this.isFeatureEnabled(LICENSE_FEATURES.VARIABLES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isVersionControlEnabled() {
|
||||||
|
return this.isFeatureEnabled(LICENSE_FEATURES.VERSION_CONTROL);
|
||||||
|
}
|
||||||
|
|
||||||
getCurrentEntitlements() {
|
getCurrentEntitlements() {
|
||||||
return this.manager?.getCurrentEntitlements() ?? [];
|
return this.manager?.getCurrentEntitlements() ?? [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,6 +160,7 @@ import { variablesController } from './environments/variables.controller';
|
||||||
import { LdapManager } from './Ldap/LdapManager.ee';
|
import { LdapManager } from './Ldap/LdapManager.ee';
|
||||||
import { getVariablesLimit, isVariablesEnabled } from '@/environments/enviromentHelpers';
|
import { getVariablesLimit, isVariablesEnabled } from '@/environments/enviromentHelpers';
|
||||||
import { getCurrentAuthenticationMethod } from './sso/ssoHelpers';
|
import { getCurrentAuthenticationMethod } from './sso/ssoHelpers';
|
||||||
|
import { isVersionControlEnabled } from './environment/versionControl/versionControlHelper';
|
||||||
|
|
||||||
const exec = promisify(callbackExec);
|
const exec = promisify(callbackExec);
|
||||||
|
|
||||||
|
@ -320,6 +321,7 @@ class Server extends AbstractServer {
|
||||||
logStreaming: false,
|
logStreaming: false,
|
||||||
advancedExecutionFilters: false,
|
advancedExecutionFilters: false,
|
||||||
variables: false,
|
variables: false,
|
||||||
|
versionControl: false,
|
||||||
},
|
},
|
||||||
hideUsagePage: config.getEnv('hideUsagePage'),
|
hideUsagePage: config.getEnv('hideUsagePage'),
|
||||||
license: {
|
license: {
|
||||||
|
@ -354,6 +356,7 @@ class Server extends AbstractServer {
|
||||||
saml: isSamlLicensed(),
|
saml: isSamlLicensed(),
|
||||||
advancedExecutionFilters: isAdvancedExecutionFiltersEnabled(),
|
advancedExecutionFilters: isAdvancedExecutionFiltersEnabled(),
|
||||||
variables: isVariablesEnabled(),
|
variables: isVariablesEnabled(),
|
||||||
|
versionControl: isVersionControlEnabled(),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isLdapEnabled()) {
|
if (isLdapEnabled()) {
|
||||||
|
|
|
@ -29,6 +29,7 @@ const enabledFeatures = {
|
||||||
[LICENSE_FEATURES.SAML]: false,
|
[LICENSE_FEATURES.SAML]: false,
|
||||||
[LICENSE_FEATURES.LOG_STREAMING]: false,
|
[LICENSE_FEATURES.LOG_STREAMING]: false,
|
||||||
[LICENSE_FEATURES.ADVANCED_EXECUTION_FILTERS]: false,
|
[LICENSE_FEATURES.ADVANCED_EXECUTION_FILTERS]: false,
|
||||||
|
[LICENSE_FEATURES.VERSION_CONTROL]: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
type Feature = keyof typeof enabledFeatures;
|
type Feature = keyof typeof enabledFeatures;
|
||||||
|
|
|
@ -75,6 +75,7 @@ export enum LICENSE_FEATURES {
|
||||||
LOG_STREAMING = 'feat:logStreaming',
|
LOG_STREAMING = 'feat:logStreaming',
|
||||||
ADVANCED_EXECUTION_FILTERS = 'feat:advancedExecutionFilters',
|
ADVANCED_EXECUTION_FILTERS = 'feat:advancedExecutionFilters',
|
||||||
VARIABLES = 'feat:variables',
|
VARIABLES = 'feat:variables',
|
||||||
|
VERSION_CONTROL = 'feat:versionControl',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum LICENSE_QUOTAS {
|
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',
|
LogStreaming = 'logStreaming',
|
||||||
Variables = 'variables',
|
Variables = 'variables',
|
||||||
Saml = 'saml',
|
Saml = 'saml',
|
||||||
|
VersionControl = 'versionControl',
|
||||||
}
|
}
|
||||||
export const MAIN_NODE_PANEL_WIDTH = 360;
|
export const MAIN_NODE_PANEL_WIDTH = 360;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue