mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Add workflow diffs feature to license checks (no-changelog) (#18130)
This commit is contained in:
@@ -153,6 +153,7 @@ export interface FrontendSettings {
|
|||||||
workerView: boolean;
|
workerView: boolean;
|
||||||
advancedPermissions: boolean;
|
advancedPermissions: boolean;
|
||||||
apiKeyScopes: boolean;
|
apiKeyScopes: boolean;
|
||||||
|
workflowDiffs: boolean;
|
||||||
projects: {
|
projects: {
|
||||||
team: {
|
team: {
|
||||||
limit: number;
|
limit: number;
|
||||||
|
|||||||
@@ -159,6 +159,10 @@ export class LicenseState {
|
|||||||
return this.isLicensed('feat:insights:viewHourlyData');
|
return this.isLicensed('feat:insights:viewHourlyData');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isWorkflowDiffsLicensed() {
|
||||||
|
return this.isLicensed('feat:workflowDiffs');
|
||||||
|
}
|
||||||
|
|
||||||
// --------------------
|
// --------------------
|
||||||
// integers
|
// integers
|
||||||
// --------------------
|
// --------------------
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ export const LICENSE_FEATURES = {
|
|||||||
INSIGHTS_VIEW_DASHBOARD: 'feat:insights:viewDashboard',
|
INSIGHTS_VIEW_DASHBOARD: 'feat:insights:viewDashboard',
|
||||||
INSIGHTS_VIEW_HOURLY_DATA: 'feat:insights:viewHourlyData',
|
INSIGHTS_VIEW_HOURLY_DATA: 'feat:insights:viewHourlyData',
|
||||||
API_KEY_SCOPES: 'feat:apiKeyScopes',
|
API_KEY_SCOPES: 'feat:apiKeyScopes',
|
||||||
|
WORKFLOW_DIFFS: 'feat:workflowDiffs',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const LICENSE_QUOTAS = {
|
export const LICENSE_QUOTAS = {
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ export class E2EController {
|
|||||||
[LICENSE_FEATURES.API_KEY_SCOPES]: false,
|
[LICENSE_FEATURES.API_KEY_SCOPES]: false,
|
||||||
[LICENSE_FEATURES.OIDC]: false,
|
[LICENSE_FEATURES.OIDC]: false,
|
||||||
[LICENSE_FEATURES.MFA_ENFORCEMENT]: false,
|
[LICENSE_FEATURES.MFA_ENFORCEMENT]: false,
|
||||||
|
[LICENSE_FEATURES.WORKFLOW_DIFFS]: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly numericFeaturesDefaults: Record<NumericLicenseFeature, number> = {
|
private static readonly numericFeaturesDefaults: Record<NumericLicenseFeature, number> = {
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ export class FrontendService {
|
|||||||
workerView: false,
|
workerView: false,
|
||||||
advancedPermissions: false,
|
advancedPermissions: false,
|
||||||
apiKeyScopes: false,
|
apiKeyScopes: false,
|
||||||
|
workflowDiffs: false,
|
||||||
projects: {
|
projects: {
|
||||||
team: {
|
team: {
|
||||||
limit: 0,
|
limit: 0,
|
||||||
@@ -356,6 +357,7 @@ export class FrontendService {
|
|||||||
workerView: this.license.isWorkerViewLicensed(),
|
workerView: this.license.isWorkerViewLicensed(),
|
||||||
advancedPermissions: this.license.isAdvancedPermissionsLicensed(),
|
advancedPermissions: this.license.isAdvancedPermissionsLicensed(),
|
||||||
apiKeyScopes: this.license.isApiKeyScopesEnabled(),
|
apiKeyScopes: this.license.isApiKeyScopesEnabled(),
|
||||||
|
workflowDiffs: this.licenseState.isWorkflowDiffsLicensed(),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.license.isLdapEnabled()) {
|
if (this.license.isLdapEnabled()) {
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ export const defaultSettings: FrontendSettings = {
|
|||||||
workerView: false,
|
workerView: false,
|
||||||
advancedPermissions: false,
|
advancedPermissions: false,
|
||||||
apiKeyScopes: false,
|
apiKeyScopes: false,
|
||||||
|
workflowDiffs: false,
|
||||||
projects: {
|
projects: {
|
||||||
team: {
|
team: {
|
||||||
limit: 1,
|
limit: 1,
|
||||||
|
|||||||
@@ -245,6 +245,7 @@ export function createMockEnterpriseSettings(
|
|||||||
workerView: false,
|
workerView: false,
|
||||||
advancedPermissions: false,
|
advancedPermissions: false,
|
||||||
apiKeyScopes: false,
|
apiKeyScopes: false,
|
||||||
|
workflowDiffs: false,
|
||||||
projects: {
|
projects: {
|
||||||
team: {
|
team: {
|
||||||
limit: 0,
|
limit: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user