Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0032819 | Openbravo ERP | A. Platform | public | 2016-05-01 17:49 | 2016-06-17 19:37 |
|
Reporter | inigosanchez | |
Assigned To | inigosanchez | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR16Q3 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0032819: An error is thrown when a Query List Widget is fetched. |
Description | An 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 Solution | Used OBContext.setAdminMode(true) to obtain WidgetClass properly. |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | feature request | 0032728 | 3.0PR16Q3 | closed | inigosanchez | Standard datasources should check entity access. |
|
Attached Files | |
|
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 | |
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
---
|
|
|
|
code reviewed
tested with different role with and without permissions |
|
|
|
|
|
|
|