fix calculate connections. exclude view users

This commit is contained in:
Alexander.Trofimov
2017-11-21 13:33:44 +03:00
parent fbb9ecb968
commit e2a59a6713

View File

@ -2525,7 +2525,10 @@ exports.install = function(server, callbackFunction) {
connectionsCount = licenseInfo.connections;
}
if (connectionsCount) {
licenseType = (connectionsCount > connections.length) ? c_LR.Success : c_LR.Connections;
const editConnectionsCount = (_.filter(connections, function (el) {
return true !== el.isCloseCoAuthoring && el.user.view !== true;
})).length;
licenseType = (connectionsCount > editConnectionsCount) ? c_LR.Success : c_LR.Connections;
}
/*if (constants.PACKAGE_TYPE_OS === licenseInfo.packageType && c_LR.Error === licenseType) {
licenseType = c_LR.SuccessLimit;