details:   https://code.openbravo.com/erp/devel/pi/rev/8aa6c24c1fb4
changeset: 17703:8aa6c24c1fb4
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Fri Aug 17 14:58:50 2012 +0200
summary:   Fixes issue 21251: Prevent acceptance level change when refreshing 
the instance

The accept level should only be reset to 'Confirmed Stable' when promoting from 
a Community to a Professional instance. Before this fix, it was being done 
every time the license was refreshed.

diffstat:

 src/org/openbravo/erpCommon/obps/ActiveInstanceProcess.java |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r a3230e6e4301 -r 8aa6c24c1fb4 
src/org/openbravo/erpCommon/obps/ActiveInstanceProcess.java
--- a/src/org/openbravo/erpCommon/obps/ActiveInstanceProcess.java       Fri Aug 
17 13:57:11 2012 +0200
+++ b/src/org/openbravo/erpCommon/obps/ActiveInstanceProcess.java       Fri Aug 
17 14:58:50 2012 +0200
@@ -95,6 +95,8 @@
         activationKey = result[1];
       }
 
+      String previousLicenseClass = 
ActivationKey.getInstance().getLicenseClass().getCode();
+
       ActivationKey ak = new ActivationKey(publicKey, activationKey);
       String nonAllowedMods = ak.verifyInstalledModules(false);
       if (!nonAllowedMods.isEmpty()) {
@@ -109,8 +111,14 @@
           SystemInformation sysInfo = 
OBDal.getInstance().get(SystemInformation.class, "0");
           sysInfo.setInstancePurpose(ak.getProperty("purpose"));
 
-          
sysInfo.setMaturitySearch(Integer.toString(MaturityLevel.CS_MATURITY));
-          
sysInfo.setMaturityUpdate(Integer.toString(MaturityLevel.CS_MATURITY));
+          // Only reset the maturity level when changing from a
+          // community to a professional license
+          // See issue https://issues.openbravo.com/view.php?id=21251
+          String newLicenseClass = 
ActivationKey.getInstance().getLicenseClass().getCode();
+          if ("C".equals(previousLicenseClass) && 
"STD".equals(newLicenseClass)) {
+            
sysInfo.setMaturitySearch(Integer.toString(MaturityLevel.CS_MATURITY));
+            
sysInfo.setMaturityUpdate(Integer.toString(MaturityLevel.CS_MATURITY));
+          }
 
           updateShowProductionFields("Y");
 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to