Openbravo Issue Tracking System - Retail Modules
View Issue Details
0046296Retail ModulesWeb POSpublic2021-04-19 15:252021-04-20 13:50
malsasua 
marvintm 
highmajoralways
closedfixed 
5
 
RR21Q3 
No
0046296: error accessing to POS if user have got access to more than one store and default org is other store
when the user has got access to more of one store, and the defaults in the user configuration are done for store 1, it is not possible to access to store 2, this error is returned


Error returned:
The user doesn't have permission to access this terminal. The organization of the user doesn't belong to the natural organization tree of the terminal
. in live:
BO:
window: user
-record: vallblanca
-tab: role:
 -add record VallBoiUser
-tab: header:
 - Default Role: ValBoiUser
 - Default POS Role: ValBoiUser
 - Default Org: Vall BoĆ­ Store

POS:
- terminal: VBS-1
- do login with user vallblanca:
error is returError returned:
The user doesn't have permission to access this terminal. The organization of the user doesn't belong to the natural organization tree of the terminalneD:


No tags attached.
has duplicate defect 0051573 closed ranjith_qualiantech_com A user can't access to a till of an store which doesn't belong to the main user default pos role 
png 1.png (1,367,381) 2021-04-19 15:25
https://issues.openbravo.com/file_download.php?file_id=15540&type=bug
Issue History
2021-04-19 15:25malsasuaNew Issue
2021-04-19 15:25malsasuaAssigned To => Retail
2021-04-19 15:25malsasuaFile Added: 1.png
2021-04-19 15:25malsasuaResolution time => 1619388000
2021-04-19 15:25malsasuaTriggers an Emergency Pack => No
2021-04-20 08:11hgbotNote Added: 0127377
2021-04-20 08:14marvintmAssigned ToRetail => marvintm
2021-04-20 08:14marvintmStatusnew => scheduled
2021-04-20 10:50maiteIssue Monitored: maite
2021-04-20 13:50hgbotResolutionopen => fixed
2021-04-20 13:50hgbotStatusscheduled => closed
2021-04-20 13:50hgbotNote Added: 0127384
2021-04-20 13:50hgbotFixed in Version => RR21Q3
2021-04-20 13:50hgbotNote Added: 0127385
2023-02-23 10:26ranjith_qualiantech_comRelationship addedhas duplicate 0051573

Notes
(0127377)
hgbot   
2021-04-20 08:11   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/382 [^]
(0127384)
hgbot   
2021-04-20 13:50   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/382 [^]
(0127385)
hgbot   
2021-04-20 13:50   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: d54711301d5341a267957e04f0b7586cf5f22aef
Author: Antonio Moreno <anmorenoperez@gmail.com>
Date: 2021-04-20T08:10:05+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/d54711301d5341a267957e04f0b7586cf5f22aef [^]

Fixed issue 46296. If either defaultPosRole or defaultRole don't have access to the terminal organization, they will be considered invalid and will not be used to set the context. If both are invalid, a proper role will be found automatically by the existing POSLoginHandlerLogic.
Additionally, fixed an existing problem to ensure that the distance returned by the getDistanceToStoreOrganizationForCertainRole method is actually -1 and not 1 when there is no access to the organization of the specified terminal.

---
M src/org/openbravo/retail/posterminal/POSLoginHandler.java
---