From 83181187c5aa25330f48e376577813933d8dfea5 Mon Sep 17 00:00:00 2001 From: Sergey Konovalov Date: Fri, 16 Feb 2024 14:33:28 +0300 Subject: [PATCH] [refactoring] Remove unused parameter and deprecated params --- Common/sources/tenantManager.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Common/sources/tenantManager.js b/Common/sources/tenantManager.js index 9ea972a6..58c24aa8 100644 --- a/Common/sources/tenantManager.js +++ b/Common/sources/tenantManager.js @@ -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;