license: fixed enterprise license not showing unlimited users

This commit is contained in:
Eberhard Graether
2018-06-14 23:12:25 +02:00
parent c65a5d04b1
commit 9c91ec50b0
2 changed files with 7 additions and 7 deletions
+7 -6
View File
@@ -90,18 +90,19 @@ std::string License::getMessage(bool withNewlines) const
message += LicenseConstants::PRODUCT_STRING + separator;
message += LicenseConstants::LICENSED_TO_STRING + m_user + separator;
message += LicenseConstants::LICENSE_TYPE_STRING + m_type;
if (m_type == LicenseConstants::TEST_LICENSE_STRING || m_type == LicenseConstants::SITE_LICENSE_STRING)
if (m_numberOfUsers == 0)
{
message += (m_createdWithSeats ? " (unlimited seats)" : " (unlimited users)");
}
else if (m_numberOfUsers > 1)
{
message += " (" + std::to_string(m_numberOfUsers) + (m_createdWithSeats ? " Seats)" : " users)");
}
else if (m_numberOfUsers == 1)
{
message += (m_createdWithSeats ? " (1 Seat)" : " (1 user)");
}
else if (m_numberOfUsers > 1)
{
message += " (" + std::to_string(m_numberOfUsers) + (m_createdWithSeats ? " Seats)" : " users)");
}
message += separator;
message += getExpireLine() + separator;
@@ -214,7 +215,7 @@ std::string License::getLicenseInfo() const
{
info += "not registered for commercial development\n";
}
else if (m_type == LicenseConstants::TEST_LICENSE_STRING || m_type == LicenseConstants::SITE_LICENSE_STRING)
else if (m_numberOfUsers == 0)
{
info += "unlimited users\n";
}
-1
View File
@@ -17,7 +17,6 @@ namespace LicenseConstants {
const char BEGIN_LICENSE_STRING[] = "-----BEGIN LICENSE-----";
const char END_LICENSE_STRING[] = "-----END LICENSE-----";
const char TEST_LICENSE_STRING[] = "Test License";
const char SITE_LICENSE_STRING[] = "Commercial Site License";
const char PRODUCT_STRING[] = "Product: Sourcetrail";
const char LICENSED_TO_STRING[] = "Licensed to: ";
const char LICENSE_TYPE_STRING[] = "License type: ";