Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032819Openbravo ERPA. Platformpublic2016-05-01 17:492016-06-17 19:37
inigosanchez 
inigosanchez 
normalminoralways
closedfixed 
5
 
3.0PR16Q3 
alostale
Core
No
0032819: An error is thrown when a Query List Widget is fetched.
An error is thrown when a Query List Widget is fetched.
- Login in Openbravo as "F&B España, S.A - Warehouse" role.
- Note that "Pending Goods Receipt" is placed on workspace.
- Realize in the log the following exception is thrown:

ERROR org.openbravo.base.exception.OBSecurityException - Entity OBKMO_WidgetClass is not readable by the user 100
org.openbravo.base.exception.OBSecurityException: Entity OBKMO_WidgetClass is not readable by the user 100
    at org.openbravo.dal.security.EntityAccessChecker.checkReadable(EntityAccessChecker.java:451)
    at org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:605)
    at org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:592)
    at org.openbravo.dal.service.OBDal.get(OBDal.java:297)
    at org.openbravo.client.querylist.QueryListDataSource.checkFetchDatasourceAccess(QueryListDataSource.java:95)
    at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:280)
Used OBContext.setAdminMode(true) to obtain WidgetClass properly.
No tags attached.
related to feature request 00327283.0PR16Q3 closed inigosanchez Standard datasources should check entity access. 
Issue History
2016-05-01 17:49inigosanchezNew Issue
2016-05-01 17:49inigosanchezAssigned To => inigosanchez
2016-05-01 17:49inigosanchezModules => Core
2016-05-01 17:49inigosanchezTriggers an Emergency Pack => No
2016-05-01 17:49inigosanchezStatusnew => scheduled
2016-05-01 23:24hgbotCheckin
2016-05-01 23:24hgbotNote Added: 0086101
2016-05-01 23:24hgbotStatusscheduled => resolved
2016-05-01 23:24hgbotResolutionopen => fixed
2016-05-01 23:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9730a855daf3ac1841079918c14554e9bd7b1784 [^]
2016-05-01 23:25inigosanchezReview Assigned To => alostale
2016-05-01 23:29inigosanchezRelationship addedrelated to 0032728
2016-05-06 08:50hgbotCheckin
2016-05-06 08:50hgbotNote Added: 0086232
2016-05-06 08:54alostaleNote Added: 0086233
2016-05-06 08:54alostaleStatusresolved => closed
2016-05-06 08:54alostaleFixed in Version => 3.0PR16Q3
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087504
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087524

Notes
(0086101)
hgbot   
2016-05-01 23:24   
Repository: erp/devel/pi
Changeset: 9730a855daf3ac1841079918c14554e9bd7b1784
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Sun May 01 18:02:32 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9730a855daf3ac1841079918c14554e9bd7b1784 [^]

Fixed issue 32819:An error is thrown when a Query List Widget is fetched

The problem was that an exception is thrown because entity OBKMO_WidgetClass
is not readable by the user 100. The problem occurs when it is try to get a
WidgetClass to check security:
OBDal.getInstance().get(WidgetClass.class,parameters.get("widgetId"));

It has been resolved by adding a OBContext.setAdminMode(true) before obtain
WidgetClass class.

---
M modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
---
(0086232)
hgbot   
2016-05-06 08:50   
Repository: erp/devel/pi
Changeset: dc6646d8f5d1837b0c5364efbcfa6338f893692e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri May 06 08:50:17 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/dc6646d8f5d1837b0c5364efbcfa6338f893692e [^]

related to bug 32819: An error is thrown when a Query List Widget is fetched

  Minor code cleanup fixes:
   -Using equals to compare Strings instead of == oprator. In this case it was
    working fine because ids were pointing to the same String instance because it
    was reused by DAL's cache. In any case, it is more correct not to check if
    they are the same instance but if the strings are equal.
   -Fixed typo

---
M modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
---
(0086233)
alostale   
2016-05-06 08:54   
code reviewed

tested with different role with and without permissions
(0087504)
hudsonbot   
2016-06-17 19:37   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0dc7be081b1c [^]
Maturity status: Test
(0087524)
hudsonbot   
2016-06-17 19:37   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0dc7be081b1c [^]
Maturity status: Test