chore(core): Introduce license feature flag for custom roles (#19038)

This commit is contained in:
Andreas Fitzek
2025-09-01 17:40:49 +02:00
committed by GitHub
parent f0e9221cb3
commit 1b5f9b220f
9 changed files with 190 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
import type { BooleanLicenseFeature } from '@n8n/constants';
import { UNLIMITED_LICENSE_QUOTA } from '@n8n/constants';
import { LICENSE_FEATURES, UNLIMITED_LICENSE_QUOTA } from '@n8n/constants';
import { Service } from '@n8n/di';
import { UnexpectedError } from 'n8n-workflow';
@@ -43,6 +43,10 @@ export class LicenseState {
// booleans
// --------------------
isCustomRolesLicensed() {
return this.isLicensed(LICENSE_FEATURES.CUSTOM_ROLES);
}
isSharingLicensed() {
return this.isLicensed('feat:sharing');
}

View File

@@ -36,6 +36,7 @@ export const LICENSE_FEATURES = {
INSIGHTS_VIEW_HOURLY_DATA: 'feat:insights:viewHourlyData',
API_KEY_SCOPES: 'feat:apiKeyScopes',
WORKFLOW_DIFFS: 'feat:workflowDiffs',
CUSTOM_ROLES: 'feat:customRoles',
} as const;
export const LICENSE_QUOTAS = {