Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033786
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2016-08-24 05:582016-09-20 13:02
ReportersureshbabuView Statuspublic 
Assigned Tomarvintm 
PriorityimmediateResolutionfixedFixed in VersionRR16Q4
StatusclosedFix in branchFixed in SCM revisioned35833d0f6d
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Merge Request Status
Review Assigned Toguilleaer
OBNetwork customerOBPS
Support ticket
Regression levelPre packaging ( pi )
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033786: [STORE SERVER 1613] At POS Terminal type window,when the user clicks the Best seller tab, system throws java error message.

DescriptionAt POS Terminal type window, after selecting the Has Bestsellers checkbox when the user clicks the Best seller tab, system throws java error message.
Steps To Reproduce Log into ERP backend

2- Go to POS Terminal Type window and select CAEN Generic Cashier record
3- Click on Has Bestsellers checkbox
4- click Best Sellers tab,

Actual result : Following error appears and not able to add records to the tab

Error:
org.openbravo.base.exception.OBSecurityException: Entity BEST_PRODUCT_TTYPE_VIEW is not accessible by this role/user: BUT Admin/Openbravo
Tags​SER QA
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0089960)
hgbot (developer)
2016-09-14 18:42

Repository: erp/pmods/org.openbravo.retail.bestsellers
Changeset: ed35833d0f6d2828795828a514ca0baa27fc61a9
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Sep 14 18:42:31 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/rev/ed35833d0f6d2828795828a514ca0baa27fc61a9 [^]

Fixed issue 33786. The Best Sellers tab in POS Terminal Type window will work again.
- The root cause of the problem was that before, there was no security check for the datasource requests triggered by tabs related to datasources instead of physical tables. The datasource defined in the Bestsellers module is used in a tab, but the datasource itself defined its corresponding entity to be a database view. The reason for this is that a datasource obviously cannot be queried via a database query, and the datasource implementation wanted to rely on the standard OB implementation for the fetch part, because the only required functionality was to be able to change the underlying table in a more convenient way.
- As now the security check ensures that you have access to the underlying entity, and as the entity defined in the datasource was different from the entity defined for the tab, the window itself gave error in Openbravo unless you explicitly gave access to the datasource-based entity in the 'Role Access' window, which shouldn't be required for users in general.
- The first part of the solution is therefore to properly define the entity in the datasource as the table associated to this datasource, and to the window tab. This ensures that the security check correctly identifies the datasource request as authorized, as the user has permission for the window.
- The second part of the solution is to dynamically reset the entity received as a parameter for fetch requests, reassigning it to a database view, which will then work correctly in the database query executed to get the data for the fetch.

---
M src/org/openbravo/retail/bestsellers/BestSellersByTerminalTypeDatasource.java
---

- Issue History
Date Modified Username Field Change
2016-08-24 05:58 sureshbabu New Issue
2016-08-24 05:58 sureshbabu Assigned To => mtaal
2016-08-24 05:58 sureshbabu OBNetwork customer => No
2016-08-24 05:58 sureshbabu Triggers an Emergency Pack => No
2016-08-24 05:58 sureshbabu Tag Attached: ​SER QA
2016-08-26 13:32 mtaal Assigned To mtaal => Retail
2016-08-26 13:32 mtaal Category StoreServer => Web POS
2016-09-08 11:35 VictorVillar OBNetwork customer No => Yes
2016-09-08 11:35 VictorVillar Resolution time => 1473890400
2016-09-08 11:35 VictorVillar Regression level => Pre packaging ( pi )
2016-09-08 11:35 VictorVillar Priority low => immediate
2016-09-08 11:35 VictorVillar Severity trivial => critical
2016-09-14 18:42 hgbot Checkin
2016-09-14 18:42 hgbot Note Added: 0089960
2016-09-14 18:42 hgbot Status new => resolved
2016-09-14 18:42 hgbot Resolution open => fixed
2016-09-14 18:42 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/rev/ed35833d0f6d2828795828a514ca0baa27fc61a9 [^]
2016-09-19 09:20 marvintm Assigned To Retail => marvintm
2016-09-19 18:56 marvintm Severity critical => major
2016-09-20 13:02 guilleaer Review Assigned To => guilleaer
2016-09-20 13:02 guilleaer Status resolved => closed
2016-09-20 13:02 guilleaer Fixed in Version => RR16Q4


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker