mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Show a banner when running a non-prod license (no-changelog) (#6849)
* add feat:showNonProdBanner * fix linting * fix linting
This commit is contained in:
committed by
GitHub
parent
775e73e0c3
commit
198a977f57
@@ -66,6 +66,7 @@ import {
|
|||||||
GENERATED_STATIC_DIR,
|
GENERATED_STATIC_DIR,
|
||||||
inDevelopment,
|
inDevelopment,
|
||||||
inE2ETests,
|
inE2ETests,
|
||||||
|
LICENSE_FEATURES,
|
||||||
N8N_VERSION,
|
N8N_VERSION,
|
||||||
RESPONSE_ERROR_MESSAGES,
|
RESPONSE_ERROR_MESSAGES,
|
||||||
TEMPLATES_DIR,
|
TEMPLATES_DIR,
|
||||||
@@ -311,6 +312,7 @@ export class Server extends AbstractServer {
|
|||||||
variables: false,
|
variables: false,
|
||||||
sourceControl: false,
|
sourceControl: false,
|
||||||
auditLogs: false,
|
auditLogs: false,
|
||||||
|
showNonProdBanner: false,
|
||||||
debugInEditor: false,
|
debugInEditor: false,
|
||||||
},
|
},
|
||||||
hideUsagePage: config.getEnv('hideUsagePage'),
|
hideUsagePage: config.getEnv('hideUsagePage'),
|
||||||
@@ -441,6 +443,9 @@ export class Server extends AbstractServer {
|
|||||||
advancedExecutionFilters: isAdvancedExecutionFiltersEnabled(),
|
advancedExecutionFilters: isAdvancedExecutionFiltersEnabled(),
|
||||||
variables: isVariablesEnabled(),
|
variables: isVariablesEnabled(),
|
||||||
sourceControl: isSourceControlLicensed(),
|
sourceControl: isSourceControlLicensed(),
|
||||||
|
showNonProdBanner: Container.get(License).isFeatureEnabled(
|
||||||
|
LICENSE_FEATURES.SHOW_NON_PROD_BANNER,
|
||||||
|
),
|
||||||
debugInEditor: isDebugInEditorLicensed(),
|
debugInEditor: isDebugInEditorLicensed(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ export const LICENSE_FEATURES = {
|
|||||||
VARIABLES: 'feat:variables',
|
VARIABLES: 'feat:variables',
|
||||||
SOURCE_CONTROL: 'feat:sourceControl',
|
SOURCE_CONTROL: 'feat:sourceControl',
|
||||||
API_DISABLED: 'feat:apiDisabled',
|
API_DISABLED: 'feat:apiDisabled',
|
||||||
|
SHOW_NON_PROD_BANNER: 'feat:showNonProdBanner',
|
||||||
WORKFLOW_HISTORY: 'feat:workflowHistory',
|
WORKFLOW_HISTORY: 'feat:workflowHistory',
|
||||||
DEBUG_IN_EDITOR: 'feat:debugInEditor',
|
DEBUG_IN_EDITOR: 'feat:debugInEditor',
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ export class E2EController {
|
|||||||
[LICENSE_FEATURES.SOURCE_CONTROL]: false,
|
[LICENSE_FEATURES.SOURCE_CONTROL]: false,
|
||||||
[LICENSE_FEATURES.VARIABLES]: false,
|
[LICENSE_FEATURES.VARIABLES]: false,
|
||||||
[LICENSE_FEATURES.API_DISABLED]: false,
|
[LICENSE_FEATURES.API_DISABLED]: false,
|
||||||
|
[LICENSE_FEATURES.SHOW_NON_PROD_BANNER]: false,
|
||||||
[LICENSE_FEATURES.WORKFLOW_HISTORY]: false,
|
[LICENSE_FEATURES.WORKFLOW_HISTORY]: false,
|
||||||
[LICENSE_FEATURES.DEBUG_IN_EDITOR]: false,
|
[LICENSE_FEATURES.DEBUG_IN_EDITOR]: false,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ const defaultSettings: IN8nUISettings = {
|
|||||||
variables: true,
|
variables: true,
|
||||||
sourceControl: false,
|
sourceControl: false,
|
||||||
auditLogs: false,
|
auditLogs: false,
|
||||||
|
versionControl: false,
|
||||||
|
showNonProdBanner: false,
|
||||||
},
|
},
|
||||||
executionMode: 'regular',
|
executionMode: 'regular',
|
||||||
executionTimeout: 0,
|
executionTimeout: 0,
|
||||||
|
|||||||
@@ -2185,6 +2185,7 @@ export interface IN8nUISettings {
|
|||||||
variables: boolean;
|
variables: boolean;
|
||||||
sourceControl: boolean;
|
sourceControl: boolean;
|
||||||
auditLogs: boolean;
|
auditLogs: boolean;
|
||||||
|
showNonProdBanner: boolean;
|
||||||
debugInEditor: boolean;
|
debugInEditor: boolean;
|
||||||
};
|
};
|
||||||
hideUsagePage: boolean;
|
hideUsagePage: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user