Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033307Retail ModulesWeb POSpublic2016-06-20 09:012018-12-19 10:08
malsasua 
guilleaer 
urgentmajoralways
closedfixed 
20Community Appliance
 
RR18Q2 
marvintm
No
0033307: Unable to do login in POS Terminal with one user with two distinct roles
If one user is related to two roles: role1 only has got access to terminal1, and role2 only has got access to terminal2, it is not possible to do login with this user in terminal2, error is returned: "Unable to do login" (see attachment)
in VBS:
. new role: "vbs role"
    manual: Yes
 . org access: "Vall Blanca Store"
 . Form access: Web POS
(see attachments role-OrgAccess.png / role-FormAccess.png)
. new role: "cms role"
    manual: Yes
 . org access: "Central Mountains Store"
 . Form access: Web POS

. new user: username: prueba
 . user roles: vbs role
               cms role
           (see attachment user-Roles.png)
 . pos terminal access:
               VBS POS Terminal
               CMS POS Terminal
           (see attachment user-POSAccess.png)

in WEB POS
. do login with user "prueba" in VBS-1 terminal -> it works
. do login with user "prueba" in CMS-1 termina -> error is returned (see attachment error.png)
No tags attached.
related to defect 0039774 closed marvintm ExternalOrderLoader should establish the context according to the POS Terminal specified in the request 
png error.png (209,059) 2016-06-20 09:01
https://issues.openbravo.com/file_download.php?file_id=9555&type=bug
png

png roleFormAccess.png (124,905) 2016-06-20 09:01
https://issues.openbravo.com/file_download.php?file_id=9556&type=bug
png

png role-OrgAccess.png (122,210) 2016-06-20 09:02
https://issues.openbravo.com/file_download.php?file_id=9557&type=bug
png

png user-roles.png (130,862) 2016-06-20 09:02
https://issues.openbravo.com/file_download.php?file_id=9558&type=bug
png

png user-POSAccess.png (130,967) 2016-06-20 09:02
https://issues.openbravo.com/file_download.php?file_id=9559&type=bug
png

diff diff33307_mobilecore.diff (1,191) 2018-01-05 15:43
https://issues.openbravo.com/file_download.php?file_id=11430&type=bug
diff 33307_fullpatch_posterminal.diff (10,803) 2018-01-11 15:51
https://issues.openbravo.com/file_download.php?file_id=11449&type=bug
Issue History
2016-06-20 09:01malsasuaNew Issue
2016-06-20 09:01malsasuaAssigned To => Retail
2016-06-20 09:01malsasuaTriggers an Emergency Pack => No
2016-06-20 09:01malsasuaFile Added: error.png
2016-06-20 09:01malsasuaFile Added: roleFormAccess.png
2016-06-20 09:02malsasuaFile Added: role-OrgAccess.png
2016-06-20 09:02malsasuaFile Added: user-roles.png
2016-06-20 09:02malsasuaFile Added: user-POSAccess.png
2017-04-19 06:07pradeepvarmaIssue Monitored: pradeepvarma
2018-01-05 10:26ngarciaResolution time => 1516921200
2018-01-05 10:26ngarciaSeverityminor => major
2018-01-05 10:26ngarciaIssue Monitored: ngarcia
2018-01-05 10:27ngarciaPrioritynormal => urgent
2018-01-05 15:43guilleaerFile Added: diff33307_mobilecore.diff
2018-01-05 15:43guilleaerFile Added: diff33307_posterminal.diff
2018-01-08 09:23guilleaerFile Added: diff33307_pt_2.diff
2018-01-08 11:52hgbotCheckin
2018-01-08 11:52hgbotNote Added: 0101614
2018-01-08 11:52hgbotStatusnew => resolved
2018-01-08 11:52hgbotResolutionopen => fixed
2018-01-08 11:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1ec4e0634fc168dffe08ece875001d0f120eb748 [^]
2018-01-08 11:52hgbotCheckin
2018-01-08 11:52hgbotNote Added: 0101615
2018-01-08 11:52hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1ec4e0634fc168dffe08ece875001d0f120eb748 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b36bc2f1a9c1778b11a3f6e004527d64008ceef7 [^]
2018-01-08 18:08marvintmAssigned ToRetail => guilleaer
2018-01-09 10:00hgbotCheckin
2018-01-09 10:00hgbotNote Added: 0101632
2018-01-10 16:05hgbotCheckin
2018-01-10 16:05hgbotNote Added: 0101657
2018-01-11 15:50guilleaerFile Deleted: diff33307_pt_2.diff
2018-01-11 15:50guilleaerFile Deleted: diff33307_posterminal.diff
2018-01-11 15:51guilleaerFile Added: 33307_fullpatch_posterminal.diff
2018-01-25 14:10marvintmReview Assigned To => marvintm
2018-01-25 14:10marvintmStatusresolved => closed
2018-01-25 14:10marvintmFixed in Version => RR18Q2
2018-07-24 17:41hgbotCheckin
2018-07-24 17:41hgbotNote Added: 0105930
2018-12-19 10:08rafarodaRelationship addedrelated to 0039774

Notes
(0101614)
hgbot   
2018-01-08 11:52   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1ec4e0634fc168dffe08ece875001d0f120eb748
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jan 08 11:51:50 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1ec4e0634fc168dffe08ece875001d0f120eb748 [^]

Fixed issue 33307: Role with access to current store will be selected when users try to login in web POS

If a user is login in web POS, and it does not have a default role for web POS, an additional logic will be executed to select a role which could allow to the user to login into the terminal which user is trying to use.
This logic only will be executed when
  1. User does not have default role for web POS
  2. User have several roles assigned
  3. At least on of this roles assigned is marked to use web POS (Has acces to the form web POS)

New logic will iterate roles assigned to the current users marked with access to web POS, and will select the first role which have access to the organization where the current terminal belongs.
This logic can work randomly when a user can use several roles allowed to use web POS with access to the same organization. In this case first role found will be selected.

---
M src/org/openbravo/retail/posterminal/POSLoginHandler.java
---
(0101615)
hgbot   
2018-01-08 11:52   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: b36bc2f1a9c1778b11a3f6e004527d64008ceef7
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jan 08 11:36:59 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b36bc2f1a9c1778b11a3f6e004527d64008ceef7 [^]

Fixed issue 33307: Use default roleId after execute getDefaults

---
M src/org/openbravo/mobile/core/login/MobileCoreLoginHandler.java
---
(0101632)
hgbot   
2018-01-09 10:00   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: b1f9184b3464832cbe9a370b8b27ce41b638a9eb
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Tue Jan 09 10:00:14 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b1f9184b3464832cbe9a370b8b27ce41b638a9eb [^]

Related to issue 33307: check default role, if it is not valid try to find a new valid one

---
M src/org/openbravo/retail/posterminal/POSLoginHandler.java
---
(0101657)
hgbot   
2018-01-10 16:05   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 048104daf8b38e76547d65c673a9f812420d323e
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Wed Jan 10 15:56:16 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/048104daf8b38e76547d65c673a9f812420d323e [^]

Related to issue 33307: Take into account natural org tree to select a role

---
M src/org/openbravo/retail/posterminal/POSLoginHandler.java
---
(0105930)
hgbot   
2018-07-24 17:41   
Repository: tools/automation/pi-mobile
Changeset: 7b4533c3ffb3e152afe865a4aebb430886aad563
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Mon Jul 16 14:34:55 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/7b4533c3ffb3e152afe865a4aebb430886aad563 [^]

Related to issue 33307: added automated test

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/I33307_VerifyLoginUserWithTwoDistinctRoles.java
---