[Widget Iframe] Now widgets opened in WebPOS doesn't consume concurrent users
authorDavid Baz Fayos <david.baz@openbravo.com>
Thu, 08 Sep 2016 17:24:46 +0200
changeset 29645 d9706128cfe6
parent 29644 78fc1e193a52
child 29646 4a7100c9db4d
[Widget Iframe] Now widgets opened in WebPOS doesn't consume concurrent users
src/index.jsp
--- a/src/index.jsp	Thu May 26 15:30:44 2016 +0200
+++ b/src/index.jsp	Thu Sep 08 17:24:46 2016 +0200
@@ -59,9 +59,10 @@
     org.openbravo.model.ad.access.Session dbSession = OBDal.getInstance().get(org.openbravo.model.ad.access.Session.class, sessionId);
     String currentSessionType = dbSession.getLoginStatus();
 
-    if (!ActivationKey.consumesConcurrentUser(currentSessionType)) {
-      // session was created not counting concurrent users, now switching to backend so they
-      // should be counted
+    if (!ActivationKey.consumesConcurrentUser(currentSessionType)
+        && !(request.getParameterMap().containsKey("urlMode") && "OBKMOWidget".equals(request.getParameter("urlMode").toString()))) {
+      // Session was created not counting concurrent users, now switching to backend so they
+      // should be counted. In case of widgets opened from WebPOS, it shouldn't count concurrent users.
       dbSession.setLoginStatus(LoginHandler.SUCCESS_SESSION_STANDARD);
       OBDal.getInstance().flush();