feat(core): Enable folders feature via license server (#13942)

This commit is contained in:
Ricardo Espinoza
2025-03-18 11:25:45 -04:00
committed by GitHub
parent 31c0575999
commit fa7e7ac2e7
4 changed files with 8 additions and 1 deletions

View File

@@ -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 = {

View File

@@ -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> = {

View File

@@ -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() ?? [];
}

View File

@@ -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;
}