Fixed issue 11654. Property safe.mode will now be always taken into account when checking available Roles, or when loging in.
authorAntonio Moreno <antonio.moreno@openbravo.com>
Mon, 07 Dec 2009 12:48:16 +0100
changeset 5633 a51a154ff19a
parent 5632 3f809a9a8f47
child 5634 5f548dfc5134
child 5665 b3b4c258fb4a
child 5899 736b8efff977
Fixed issue 11654. Property safe.mode will now be always taken into account when checking available Roles, or when loging in.
build.xml
src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
src/org/openbravo/erpCommon/ad_forms/Role.java
--- a/build.xml	Mon Dec 07 17:11:02 2009 +0530
+++ b/build.xml	Mon Dec 07 12:48:16 2009 +0100
@@ -583,7 +583,8 @@
     <antcall target="update.database.mod" />
     <updatesystemstatus v="RB21"/>
     <antcall target="generate.entities" />
-    
+
+    <updatesystemstatus v="RB31"/>
     <antcall inheritall="true" inheritrefs="true" target="apply.module" />
 
     <condition property="apply.modules.complete.compilation.var">
@@ -613,7 +614,6 @@
   </target>
 
   <target name="apply.module">
-    <updatesystemstatus v="RB31"/>
     <java classname="org.openbravo.erpCommon.modules.ApplyModuleTask" fork="true" maxmemory="${build.maxmemory}">
       <arg line="'${base.src}'" />
       <classpath refid="project.class.path" />
--- a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java	Mon Dec 07 17:11:02 2009 +0530
+++ b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java	Mon Dec 07 12:48:16 2009 +0100
@@ -210,7 +210,8 @@
 
           SystemInformation sysInfo = OBDal.getInstance().get(SystemInformation.class, "0");
           boolean correctSystemStatus = sysInfo.getSystemStatus() == null
-              || sysInfo.getSystemStatus().equals("RB70");
+              || this.globalParameters.getOBProperty("safe.mode", "false")
+                  .equalsIgnoreCase("false") || sysInfo.getSystemStatus().equals("RB70");
           ActivationKey ak = new ActivationKey();
           LicenseRestriction limitation = ak.checkOPSLimitations(variables.getDBSession());
           // We check if there is a Openbravo Professional Subscription restriction in the license,
--- a/src/org/openbravo/erpCommon/ad_forms/Role.java	Mon Dec 07 17:11:02 2009 +0530
+++ b/src/org/openbravo/erpCommon/ad_forms/Role.java	Mon Dec 07 12:48:16 2009 +0100
@@ -197,6 +197,7 @@
       ActivationKey ak = new ActivationKey();
       SystemInformation sysInfo = OBDal.getInstance().get(SystemInformation.class, "0");
       boolean correctSystemStatus = sysInfo.getSystemStatus() == null
+          || this.globalParameters.getOBProperty("safe.mode", "false").equalsIgnoreCase("false")
           || sysInfo.getSystemStatus().equals("RB70");
       LicenseRestriction limitation = ak.checkOPSLimitations(vars.getDBSession());
       if (limitation == LicenseRestriction.OPS_INSTANCE_NOT_ACTIVE