license: fixed enterprise license not showing unlimited users
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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: ";
|
||||
|
||||
Reference in New Issue
Block a user