mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Enable folders feature via license server (#13942)
This commit is contained in:
@@ -94,6 +94,7 @@ export const LICENSE_FEATURES = {
|
||||
ASK_AI: 'feat:askAi',
|
||||
COMMUNITY_NODES_CUSTOM_REGISTRY: 'feat:communityNodes:customRegistry',
|
||||
AI_CREDITS: 'feat:aiCredits',
|
||||
FOLDERS: 'feat:folders',
|
||||
} as const;
|
||||
|
||||
export const LICENSE_QUOTAS = {
|
||||
|
||||
@@ -101,6 +101,7 @@ export class E2EController {
|
||||
[LICENSE_FEATURES.COMMUNITY_NODES_CUSTOM_REGISTRY]: false,
|
||||
[LICENSE_FEATURES.ASK_AI]: false,
|
||||
[LICENSE_FEATURES.AI_CREDITS]: false,
|
||||
[LICENSE_FEATURES.FOLDERS]: false,
|
||||
};
|
||||
|
||||
private static readonly numericFeaturesDefaults: Record<NumericLicenseFeature, number> = {
|
||||
|
||||
@@ -300,6 +300,10 @@ export class License {
|
||||
return this.isFeatureEnabled(LICENSE_FEATURES.COMMUNITY_NODES_CUSTOM_REGISTRY);
|
||||
}
|
||||
|
||||
isFoldersEnabled() {
|
||||
return this.isFeatureEnabled(LICENSE_FEATURES.FOLDERS);
|
||||
}
|
||||
|
||||
getCurrentEntitlements() {
|
||||
return this.manager?.getCurrentEntitlements() ?? [];
|
||||
}
|
||||
|
||||
@@ -362,7 +362,8 @@ export class FrontendService {
|
||||
|
||||
this.settings.enterprise.projects.team.limit = this.license.getTeamProjectLimit();
|
||||
|
||||
this.settings.folders.enabled = config.get('folders.enabled');
|
||||
this.settings.folders.enabled =
|
||||
config.get('folders.enabled') || this.license.isFoldersEnabled();
|
||||
|
||||
return this.settings;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user