fase(17): licensing module with RSA validation

This commit is contained in:
debian
2026-03-08 05:20:54 -04:00
parent 1f1678af17
commit 5a28270dc9
45 changed files with 1789 additions and 48 deletions

View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.requireFeature = requireFeature;
function requireFeature(licenseService, feature) {
return (_req, res, next) => {
if (!licenseService.hasFeature(feature)) {
res.status(403).json({
error: 'Feature not available',
feature,
plan: licenseService.getCurrentLicense().plan.toString(),
message: `This feature requires a higher license plan. Current plan: ${licenseService.getCurrentLicense().plan.toString()}`,
});
return;
}
next();
};
}