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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032819
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2016-05-01 17:492016-06-17 19:37
ReporterinigosanchezView Statuspublic 
Assigned Toinigosanchez 
PrioritynormalResolutionfixedFixed in Version3.0PR16Q3
StatusclosedFix in branchFixed in SCM revision9730a855daf3
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0032819: An error is thrown when a Query List Widget is fetched.

DescriptionAn error is thrown when a Query List Widget is fetched.
Steps To Reproduce- 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)
Proposed SolutionUsed OBContext.setAdminMode(true) to obtain WidgetClass properly.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 00327283.0PR16Q3 closedinigosanchez Standard datasources should check entity access. 

-  Notes
(0086101)
hgbot (developer)
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 (developer)
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 (manager)
2016-05-06 08:54

code reviewed

tested with different role with and without permissions
(0087504)
hudsonbot (developer)
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 (developer)
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

- Issue History
Date Modified Username Field Change
2016-05-01 17:49 inigosanchez New Issue
2016-05-01 17:49 inigosanchez Assigned To => inigosanchez
2016-05-01 17:49 inigosanchez Modules => Core
2016-05-01 17:49 inigosanchez Triggers an Emergency Pack => No
2016-05-01 17:49 inigosanchez Status new => scheduled
2016-05-01 23:24 hgbot Checkin
2016-05-01 23:24 hgbot Note Added: 0086101
2016-05-01 23:24 hgbot Status scheduled => resolved
2016-05-01 23:24 hgbot Resolution open => fixed
2016-05-01 23:24 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9730a855daf3ac1841079918c14554e9bd7b1784 [^]
2016-05-01 23:25 inigosanchez Review Assigned To => alostale
2016-05-01 23:29 inigosanchez Relationship added related to 0032728
2016-05-06 08:50 hgbot Checkin
2016-05-06 08:50 hgbot Note Added: 0086232
2016-05-06 08:54 alostale Note Added: 0086233
2016-05-06 08:54 alostale Status resolved => closed
2016-05-06 08:54 alostale Fixed in Version => 3.0PR16Q3
2016-06-17 19:37 hudsonbot Checkin
2016-06-17 19:37 hudsonbot Note Added: 0087504
2016-06-17 19:37 hudsonbot Checkin
2016-06-17 19:37 hudsonbot Note Added: 0087524


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker