Skip to content

Commit

Permalink
[refactoring] Remove unused parameter and deprecated params
Browse files Browse the repository at this point in the history
konovalovsergey committed Feb 16, 2024
1 parent fe3eb83 commit 8318118
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Common/sources/tenantManager.js
Original file line number Diff line number Diff line change
@@ -304,11 +304,6 @@ async function readLicenseTenant(ctx, licenseFile, baseVerifiedLicense) {
if (true === oLicense['developer']) {
res.mode |= c_LM.Developer;
}
// ToDo delete mode
if (oLicense.hasOwnProperty('mode')) {
res.mode |= ('developer' === oLicense['mode'] ? c_LM.Developer : ('trial' === oLicense['mode'] ? c_LM.Trial : c_LM.None));
}

if (oLicense.hasOwnProperty('light')) {
res.light = (true === oLicense['light'] || 'true' === oLicense['light'] || 'True' === oLicense['light']); // Someone who likes to put json string instead of bool
}
@@ -324,9 +319,6 @@ async function readLicenseTenant(ctx, licenseFile, baseVerifiedLicense) {
if (oLicense.hasOwnProperty('advanced_api')) {
res.advancedApi = !!oLicense['advanced_api'];
}
if (oLicense.hasOwnProperty('process')) {
res.connections = Math.max(res.count, oLicense['process'] >> 0) * 75;
}
if (oLicense.hasOwnProperty('connections')) {
res.connections = oLicense['connections'] >> 0;
}
@@ -349,7 +341,7 @@ async function readLicenseTenant(ctx, licenseFile, baseVerifiedLicense) {
const checkDate = ((res.mode & c_LM.Trial) || timeLimited) ? new Date() : licenseInfo.buildDate;
//Calendar check of start_date allows to issue a license for old versions
const checkStartDate = new Date();
if (startDate <= checkStartDate && checkDate <= endDate && (!oLicense.hasOwnProperty('version') || 2 <= oLicense['version'])) {
if (startDate <= checkStartDate && checkDate <= endDate) {
res.type = c_LR.Success;
} else if (startDate > checkStartDate) {
res.type = c_LR.NotBefore;

0 comments on commit 8318118

Please sign in to comment.