diff --git a/ChangeLog b/ChangeLog index 20e8b252b41..48c9cb0f6da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ Bug fixes: Enhancements: - #7143 Ability to stop Synergy on the login screen - #7157 Synergy Business accepts only business licenses +- #7188 Synergy Basic\Pro accepts business licenses - #7166 Replace language notifications with warnings in logs - #7181 Fedora 36 support to CI system diff --git a/src/gui/src/LicenseManager.cpp b/src/gui/src/LicenseManager.cpp index 3d4f8c26862..fe8ae0d6904 100644 --- a/src/gui/src/LicenseManager.cpp +++ b/src/gui/src/LicenseManager.cpp @@ -37,13 +37,11 @@ LicenseManager::setSerialKey(SerialKey serialKey, bool acceptExpired) throw std::runtime_error("Serial key expired"); } + #ifdef SYNERGY_BUSINESS if (!serialKey.isValid()) { - #ifdef SYNERGY_BUSINESS throw std::runtime_error("The serial key is not compatible with the business version of Synergy."); - #else - throw std::runtime_error("The serial key is not compatible with the consumer version of Synergy."); - #endif } + #endif if (serialKey != m_serialKey) { using std::swap; diff --git a/src/lib/shared/SerialKeyEdition.cpp b/src/lib/shared/SerialKeyEdition.cpp index 7e8482682ce..0adf0240609 100644 --- a/src/lib/shared/SerialKeyEdition.cpp +++ b/src/lib/shared/SerialKeyEdition.cpp @@ -23,7 +23,8 @@ const std::map& getSerialTypes() {SerialKeyEdition::BASIC, kBasic}, {SerialKeyEdition::PRO, kPro}, {SerialKeyEdition::BASIC_CHINA, kBasic_China}, - {SerialKeyEdition::PRO_CHINA, kPro_China} + {SerialKeyEdition::PRO_CHINA, kPro_China}, + {SerialKeyEdition::BUSINESS, kBusiness} }; #endif return serialTypes; diff --git a/src/test/unittests/shared/SerialKeyEditionTests.cpp b/src/test/unittests/shared/SerialKeyEditionTests.cpp index c9710db8650..956100992df 100644 --- a/src/test/unittests/shared/SerialKeyEditionTests.cpp +++ b/src/test/unittests/shared/SerialKeyEditionTests.cpp @@ -78,8 +78,8 @@ TEST(SerialKeyEditionTests, SetEditionProChina) TEST(SerialKeyEditionTests, NameConstructor) { SerialKeyEdition edition(SerialKeyEdition::BUSINESS); - EXPECT_EQ(kUnregistered, edition.getType()); - EXPECT_FALSE(edition.isValid()); + EXPECT_EQ(kBusiness, edition.getType()); + EXPECT_TRUE(edition.isValid()); } TEST(SerialKeyEditionTests, isValid) @@ -92,7 +92,7 @@ TEST(SerialKeyEditionTests, isValid) EXPECT_TRUE(edition.isValid()); edition.setType(Edition::kBusiness); - EXPECT_FALSE(edition.isValid()); + EXPECT_TRUE(edition.isValid()); edition.setType(Edition::kPro); EXPECT_TRUE(edition.isValid());