mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 12:19:09 +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',
|
ASK_AI: 'feat:askAi',
|
||||||
COMMUNITY_NODES_CUSTOM_REGISTRY: 'feat:communityNodes:customRegistry',
|
COMMUNITY_NODES_CUSTOM_REGISTRY: 'feat:communityNodes:customRegistry',
|
||||||
AI_CREDITS: 'feat:aiCredits',
|
AI_CREDITS: 'feat:aiCredits',
|
||||||
|
FOLDERS: 'feat:folders',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const LICENSE_QUOTAS = {
|
export const LICENSE_QUOTAS = {
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ export class E2EController {
|
|||||||
[LICENSE_FEATURES.COMMUNITY_NODES_CUSTOM_REGISTRY]: false,
|
[LICENSE_FEATURES.COMMUNITY_NODES_CUSTOM_REGISTRY]: false,
|
||||||
[LICENSE_FEATURES.ASK_AI]: false,
|
[LICENSE_FEATURES.ASK_AI]: false,
|
||||||
[LICENSE_FEATURES.AI_CREDITS]: false,
|
[LICENSE_FEATURES.AI_CREDITS]: false,
|
||||||
|
[LICENSE_FEATURES.FOLDERS]: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly numericFeaturesDefaults: Record<NumericLicenseFeature, number> = {
|
private static readonly numericFeaturesDefaults: Record<NumericLicenseFeature, number> = {
|
||||||
|
|||||||
@@ -300,6 +300,10 @@ export class License {
|
|||||||
return this.isFeatureEnabled(LICENSE_FEATURES.COMMUNITY_NODES_CUSTOM_REGISTRY);
|
return this.isFeatureEnabled(LICENSE_FEATURES.COMMUNITY_NODES_CUSTOM_REGISTRY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isFoldersEnabled() {
|
||||||
|
return this.isFeatureEnabled(LICENSE_FEATURES.FOLDERS);
|
||||||
|
}
|
||||||
|
|
||||||
getCurrentEntitlements() {
|
getCurrentEntitlements() {
|
||||||
return this.manager?.getCurrentEntitlements() ?? [];
|
return this.manager?.getCurrentEntitlements() ?? [];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -362,7 +362,8 @@ export class FrontendService {
|
|||||||
|
|
||||||
this.settings.enterprise.projects.team.limit = this.license.getTeamProjectLimit();
|
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;
|
return this.settings;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user