details: https://code.openbravo.com/erp/devel/pi/rev/037253b579a3
changeset: 33450:037253b579a3
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Thu Feb 15 13:01:08 2018 +0100
summary: fixed bug 37928: sys admin CUR sessions are not automatically kicked
out
System Admin CUR session (created when CU limit is reached), consume CU but
were not kicked out after inactivity period before rejecting other logins.
Fixed by including CUR sessions in the ones that are automatically always
killed if no ping is detected for 2 minutes.
diffstat:
src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java | 6 ++++--
src/org/openbravo/erpCommon/obps/ActivationKey.java | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diffs (43 lines):
diff -r cdfabd384be4 -r 037253b579a3
src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
--- a/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java Thu Feb
15 10:36:34 2018 +0100
+++ b/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java Thu Feb
15 13:01:08 2018 +0100
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2008-2017 Openbravo SLU
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -49,6 +49,7 @@
import org.hibernate.criterion.Restrictions;
import org.openbravo.base.provider.OBProvider;
import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.client.kernel.RequestContext;
import org.openbravo.dal.core.OBContext;
import org.openbravo.dal.service.OBCriteria;
import org.openbravo.dal.service.OBDal;
@@ -699,7 +700,8 @@
public static HeartBeatOrRegistration isLoginPopupRequired(String roleId,
String javaDateFormat,
ConnectionProvider connectionProvider) throws ServletException {
if (roleId != null && "0".equals(roleId)) {
- if (ActivationKey.getInstance().checkOPSLimitations(null) ==
LicenseRestriction.ON_DEMAND_OFF_PLATFORM) {
+ String sessionId = (String)
RequestContext.get().getSession().getAttribute("#AD_SESSION_ID");
+ if (ActivationKey.getInstance().checkOPSLimitations(sessionId) ==
LicenseRestriction.ON_DEMAND_OFF_PLATFORM) {
return HeartBeatOrRegistration.OutOfDemandPlatform;
}
// Check if the instance purpose is set.
diff -r cdfabd384be4 -r 037253b579a3
src/org/openbravo/erpCommon/obps/ActivationKey.java
--- a/src/org/openbravo/erpCommon/obps/ActivationKey.java Thu Feb 15
10:36:34 2018 +0100
+++ b/src/org/openbravo/erpCommon/obps/ActivationKey.java Thu Feb 15
13:01:08 2018 +0100
@@ -256,7 +256,8 @@
private static final List<String> BACKOFFICE_SUCESS_SESSION_TYPES =
Arrays.asList(//
"S", // Standard success session
- "SUR" // Concurrent users soft limit reached
+ "SUR", // Concurrent users soft limit reached
+ "CUR" // Concurrent users hard limit reached
);
public static final Long NO_LIMIT = -1L;
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits