mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
chore(core): Introduce license feature flag for custom roles (#19038)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user