refactor(core): Separate license state from license service (#15097)

This commit is contained in:
Iván Ovejero
2025-05-06 09:43:08 +02:00
committed by GitHub
parent e86edf536f
commit ca0e7ffe3b
18 changed files with 365 additions and 104 deletions

View File

@@ -153,8 +153,7 @@ export class E2EController {
private readonly userRepository: UserRepository,
private readonly authUserRepository: AuthUserRepository,
) {
license.isFeatureEnabled = (feature: BooleanLicenseFeature) =>
this.enabledFeatures[feature] ?? false;
license.isLicensed = (feature: BooleanLicenseFeature) => this.enabledFeatures[feature] ?? false;
// Ugly hack to satisfy biome parser
const getFeatureValue = <T extends keyof FeatureReturnType>(
@@ -166,7 +165,7 @@ export class E2EController {
return UNLIMITED_LICENSE_QUOTA as FeatureReturnType[T];
}
};
license.getFeatureValue = getFeatureValue;
license.getValue = getFeatureValue;
license.getPlanName = () => 'Enterprise';
}