unlim process if validate license

convert process (if exist) to connections 1 -> 100
This commit is contained in:
Alexander.Trofimov
2017-10-24 19:00:35 +03:00
parent af26a133ec
commit abb6244bdd

View File

@ -70,7 +70,8 @@ exports.readLicense = function*() {
const isTrial = res.trial = (true === oLicense['trial'] || 'true' === oLicense['trial']); // Someone who likes to put json string instead of bool
const checkDate = (isTrial && constants.PACKAGE_TYPE_OS === oPackageType) ? new Date() : oBuildDate;
if (endDate >= checkDate && 2 <= oLicense['version']) {
res.count = Math.min(Math.max(res.count, oLicense['process'] >> 0), resMax.count);
res.connections = Math.max(res.count, oLicense['process'] >> 0) * 100;
res.count = resMax.count;
res.type = c_LR.Success;
} else {
res.type = isTrial ? c_LR.ExpiredTrial : c_LR.Expired;
@ -79,7 +80,7 @@ exports.readLicense = function*() {
res.light = (true === oLicense['light'] || 'true' === oLicense['light']); // Someone who likes to put json string instead of bool
res.branding = (true === oLicense['branding'] || 'true' === oLicense['branding']); // Someone who likes to put json string instead of bool
if (oLicense.hasOwnProperty('connections')) {
res.connections = oLicense['connections'];
res.connections = oLicense['connections'] >> 0;
}
} else {
throw 'verify';