feat(core): Debug in Editor flag (no-changelog) (#6888)

* feat(cli): Debug in Editor flag (no-changelog)

* fix: Lint issue

* chore: Use correct lock version

* fix: Remove dependency cycle
This commit is contained in:
Omar Ajoue 2023-08-09 16:38:17 +02:00 committed by GitHub
parent d396935281
commit 3d2f4406d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 0 deletions

View file

@ -128,6 +128,10 @@ export class License {
return this.isFeatureEnabled(LICENSE_FEATURES.ADVANCED_EXECUTION_FILTERS);
}
isDebugInEditorLicensed() {
return this.isFeatureEnabled(LICENSE_FEATURES.DEBUG_IN_EDITOR);
}
isVariablesEnabled() {
return this.isFeatureEnabled(LICENSE_FEATURES.VARIABLES);
}

View file

@ -148,6 +148,7 @@ import { License } from './License';
import {
getStatusUsingPreviousExecutionStatusMethod,
isAdvancedExecutionFiltersEnabled,
isDebugInEditorLicensed,
} from './executions/executionHelpers';
import { getSamlLoginLabel, isSamlLoginEnabled, isSamlLicensed } from './sso/saml/samlHelpers';
import { SamlController } from './sso/saml/routes/saml.controller.ee';
@ -310,6 +311,7 @@ export class Server extends AbstractServer {
variables: false,
sourceControl: false,
auditLogs: false,
debugInEditor: false,
},
hideUsagePage: config.getEnv('hideUsagePage'),
license: {
@ -430,6 +432,7 @@ export class Server extends AbstractServer {
advancedExecutionFilters: isAdvancedExecutionFiltersEnabled(),
variables: isVariablesEnabled(),
sourceControl: isSourceControlLicensed(),
debugInEditor: isDebugInEditorLicensed(),
});
if (isLdapEnabled()) {

View file

@ -76,6 +76,7 @@ export const LICENSE_FEATURES = {
SOURCE_CONTROL: 'feat:sourceControl',
API_DISABLED: 'feat:apiDisabled',
WORKFLOW_HISTORY: 'feat:workflowHistory',
DEBUG_IN_EDITOR: 'feat:debugInEditor',
} as const;
export const LICENSE_QUOTAS = {

View file

@ -62,6 +62,7 @@ export class E2EController {
[LICENSE_FEATURES.VARIABLES]: false,
[LICENSE_FEATURES.API_DISABLED]: false,
[LICENSE_FEATURES.WORKFLOW_HISTORY]: false,
[LICENSE_FEATURES.DEBUG_IN_EDITOR]: false,
};
constructor(

View file

@ -23,3 +23,8 @@ export function isAdvancedExecutionFiltersEnabled(): boolean {
const license = Container.get(License);
return license.isAdvancedExecutionFiltersEnabled();
}
export function isDebugInEditorLicensed(): boolean {
const license = Container.get(License);
return license.isDebugInEditorLicensed();
}

View file

@ -2185,6 +2185,7 @@ export interface IN8nUISettings {
variables: boolean;
sourceControl: boolean;
auditLogs: boolean;
debugInEditor: boolean;
};
hideUsagePage: boolean;
license: {