From aa79ef801849da4143efc06a60bd15944504ca1d Mon Sep 17 00:00:00 2001 From: "Alexander.Trofimov" Date: Fri, 14 Sep 2018 16:59:23 +0300 Subject: [PATCH] [info] Add params Add buildDate and endDate to license info --- Common/sources/license.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Common/sources/license.js b/Common/sources/license.js index 0ccea3e1..d30fab11 100644 --- a/Common/sources/license.js +++ b/Common/sources/license.js @@ -65,7 +65,9 @@ exports.readLicense = function*() { usersCount: 0, usersExpire: constants.LICENSE_EXPIRE_USERS_ONE_DAY, hasLicense: false, - plugins: false + plugins: false, + buildDate: oBuildDate, + endDate: null }; let checkFile = false; try { @@ -80,6 +82,7 @@ exports.readLicense = function*() { const publicKey = '-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDRhGF7X4A0ZVlEg594WmODVVUI\niiPQs04aLmvfg8SborHss5gQXu0aIdUT6nb5rTh5hD2yfpF2WIW6M8z0WxRhwicg\nXwi80H1aLPf6lEPPLvN29EhQNjBpkFkAJUbS8uuhJEeKw0cE49g80eBBF4BCqSL6\nPFQbP9/rByxdxEoAIQIDAQAB\n-----END PUBLIC KEY-----\n'; if (verify.verify(publicKey, sign, 'hex')) { const endDate = new Date(oLicense['end_date']); + res.endDate = endDate; const isTrial = (true === oLicense['trial'] || 'true' === oLicense['trial']); // Someone who likes to put json string instead of bool res.mode = isTrial ? c_LM.Trial : getLicenseMode(oLicense['mode']); const checkDate = c_LM.Trial === res.mode ? new Date() : oBuildDate;