Openbravo Issue Tracking System - POS2
View Issue Details
0052852POS2Corepublic2023-06-26 16:552023-06-29 09:31
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
 
approved
No
No
0052852: e.permissions is not iterable error when trying to log in
Under some circumstances, not clear yet, a "e.permissions is not iterable" error is displayed when trying to log in.

The problem seems to be caused by the application not being consistent when checking if a user has already logged in. Here [1] it checks if the session is active by checking if the logged user is not System, while here [2] it does it by checking if the user has a valid session. There are time where [2] evalues to true by [1] evaluates to false, resulting in the "e.permissions is not iterable" error.

To address the problem we will make sure the same condition (a combination of [1] and [2]) is checked in both places.

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/blob/master/src/org/openbravo/core2/login/Core2LoginUtilsServlet.java#L61 [^]
[2] https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/blob/master/src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java#L88 [^]
No steps to reproduce where found.
No tags attached.
depends on backport 005288323Q3 closed AugustoMauch e.permissions is not iterable error when trying to log in 
depends on backport 005288423Q2.2 closed AugustoMauch e.permissions is not iterable error when trying to log in 
depends on backport 005288523Q1.4 closed AugustoMauch e.permissions is not iterable error when trying to log in 
Issue History
2023-06-26 16:55AugustoMauchNew Issue
2023-06-26 16:55AugustoMauchAssigned To => Triage Platform Base
2023-06-26 16:55AugustoMauchOBNetwork customer => No
2023-06-26 16:55AugustoMauchTriggers an Emergency Pack => No
2023-06-26 16:55AugustoMauchAssigned ToTriage Platform Base => AugustoMauch
2023-06-26 16:55AugustoMauchStatusnew => scheduled
2023-06-26 16:57hgbotMerge Request Status => open
2023-06-26 16:57hgbotNote Added: 0151655
2023-06-26 16:57hgbotNote Added: 0151656
2023-06-29 09:14hgbotMerge Request Statusopen => approved
2023-06-29 09:17hgbotResolutionopen => fixed
2023-06-29 09:17hgbotNote Added: 0151793
2023-06-29 09:17hgbotStatusscheduled => closed
2023-06-29 09:17hgbotFixed in Version => 23Q4
2023-06-29 09:17hgbotNote Added: 0151794
2023-06-29 09:17hgbotFixed in Version23Q4 => RR23Q4
2023-06-29 09:17hgbotNote Added: 0151795
2023-06-29 09:17hgbotNote Added: 0151796
2023-06-29 09:31AugustoMauchNote Added: 0151797
2023-06-29 09:31AugustoMauchStatusclosed => new
2023-06-29 09:31AugustoMauchResolutionfixed => open
2023-06-29 09:31AugustoMauchFixed in VersionRR23Q4 =>
2023-06-29 09:31AugustoMauchStatusnew => scheduled
2023-06-29 09:31AugustoMauchStatusscheduled => resolved
2023-06-29 09:31AugustoMauchResolutionopen => fixed
2023-06-29 09:31AugustoMauchStatusresolved => closed

Notes
(0151655)
hgbot   
2023-06-26 16:57   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1156 [^]
(0151656)
hgbot   
2023-06-26 16:57   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/558 [^]
(0151793)
hgbot   
2023-06-29 09:17   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1156 [^]
(0151794)
hgbot   
2023-06-29 09:17   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 49b566908ef0588cd2defe909aa7540ba79853ba
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 29-06-2023 07:14:05
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/49b566908ef0588cd2defe909aa7540ba79853ba [^]

Fixes ISSUE-52852: Be consistent when checking if the user is authenticated

Now both in MobileCoreLoginUtilsServlet and in Core2LoginUtilsServlet, the same condition will be check to
determine if the current user is authenticated. The isSessionActive has been moved from the latter to the
former

---
M src/org/openbravo/core2/login/Core2LoginUtilsServlet.java
---
(0151795)
hgbot   
2023-06-29 09:17   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 4c892f2da013da558eb9084358d52e2a61ff4b24
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 28-06-2023 15:53:52
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/4c892f2da013da558eb9084358d52e2a61ff4b24 [^]

Fixes ISSUE-52852: Be consistent when checking if the user is authenticatedd

Now both in MobileCoreLoginUtilsServlet and in Core2LoginUtilsServlet, the same condition will be check to
determine if the current user is authenticated. The isSessionActive has been moved from the latter to the
former

---
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
---
(0151796)
hgbot   
2023-06-29 09:17   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/558 [^]
(0151797)
AugustoMauch   
2023-06-29 09:31   
Reopened to create backports