Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0041486 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | always | 2019-07-30 14:51 | 2019-08-07 08:02 | |||
Reporter | aaroncalero | View Status | public | |||||
Assigned To | alekosmp86 | |||||||
Priority | high | Resolution | fixed | Fixed in Version | RR19Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 31963d7f3ee6 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | marvintm | |||||||
OBNetwork customer | Gold | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0041486: Approvals don't work in offline mode when the approval is a complex object | |||||||
Description | The OB.UTIL.Approval.requestApproval API supports approvals passed as single strings, and also as objects (with approval, message and optional params). When a call to requestApproval is done in offline mode with an object approval, it will always return the message "<User> does not have privileges to approve this action. | |||||||
Steps To Reproduce | Check the code of the fail function in OB.UTIL.checkApproval: https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/tip/web/org.openbravo.retail.posterminal/js/utils/ob-utilitiesuipos.js#l594 [^] The approval is compared "as is" against the saved permissions, which is wrong. | |||||||
Proposed Solution | Instead of checking the approval "as is": if (_.contains(JSON.parse(supervisor.get('permissions')), perm)) { Get from 'perm' the real approval and then check that approval on the saved permissions: var approvalToCheck = (typeof (perm) === 'object' ? perm.approval : perm); if (JSON.parse(user.get('terminalinfo')).permissions[approvalToCheck]) { Note: The same code appears 3 times on the same function. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() ![]() | |||||||
![]() |
|
![]() |
|
(0113794) hgbot (developer) 2019-08-02 20:02 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: 31963d7f3ee66c6b6e52c59e19773d179eae9cc5 Author: Alejandro <alekosmp86 <at> gmail.com> Date: Thu Aug 01 16:07:23 2019 -0400 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/31963d7f3ee66c6b6e52c59e19773d179eae9cc5 [^] Fixed issue 41486: When in offline mode, if the approval is a complex object, then the proper value of the approval is taken from it. --- M web/org.openbravo.retail.posterminal/js/utils/ob-utilitiesuipos.js --- |
![]() |
|||
Date Modified | Username | Field | Change |
2019-07-30 14:51 | aaroncalero | New Issue | |
2019-07-30 14:51 | aaroncalero | Assigned To | => Retail |
2019-07-30 14:51 | aaroncalero | OBNetwork customer | => Gold |
2019-07-30 14:51 | aaroncalero | Resolution time | => 1565647200 |
2019-07-30 14:51 | aaroncalero | Triggers an Emergency Pack | => No |
2019-07-30 15:01 | aaroncalero | File Added: Issue41486.diff | |
2019-07-30 15:03 | aaroncalero | File Added: Issue41486_q1.diff | |
2019-08-01 20:54 | alekosmp86 | Assigned To | Retail => alekosmp86 |
2019-08-02 20:02 | hgbot | Checkin | |
2019-08-02 20:02 | hgbot | Note Added: 0113794 | |
2019-08-02 20:02 | hgbot | Status | new => resolved |
2019-08-02 20:02 | hgbot | Resolution | open => fixed |
2019-08-02 20:02 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/31963d7f3ee66c6b6e52c59e19773d179eae9cc5 [^] |
2019-08-07 08:02 | marvintm | Review Assigned To | => marvintm |
2019-08-07 08:02 | marvintm | Status | resolved => closed |
2019-08-07 08:02 | marvintm | Fixed in Version | => RR19Q4 |
Copyright © 2000 - 2009 MantisBT Group |