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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028586
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2015-01-13 15:342017-06-01 14:53
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityurgentResolutionfixedFixed in Version3.0PR16Q3
StatusclosedFix in branchFixed in SCM revision840a1ebd69c8
ProjectionnoneETAnoneTarget Version3.0PR16Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028586: SimpleProduct selector shows errors in log when there are translations installed

DescriptionWhen there is at least a translation installed, using SimpleProduct selector logs errors if the role has no derived read access to uOMTrl entity.

Even the error appears the selector works fine, but it always shows the base name for the uom (if it is present) instead of the translated one.
Steps To Reproduce-Install Spanish translation
-Create a manual role with access only to Sales Invoice window
-Login with that role
-Go to Sales Invoice window
-Create a new header
-Create a new Line and open product drop down
  --> This error appears in log

8737052 [http-8080-10] ERROR org.openbravo.base.exception.OBSecurityException - Entity UOMTrl is not readable by the user 100
org.openbravo.base.exception.OBSecurityException: Entity UOMTrl is not readable by the user 100
    at org.openbravo.dal.security.EntityAccessChecker.checkReadable(EntityAccessChecker.java:346)
    at org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:596)
    at org.openbravo.dal.service.OBDal.createCriteria(OBDal.java:458)
    at org.openbravo.base.structure.BaseOBObject.getDataValue(BaseOBObject.java:144)
    at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:253)
    at org.openbravo.base.structure.IdentifierProvider.getIdentifier(IdentifierProvider.java:133)
    at org.openbravo.base.structure.IdentifierProvider.getIdentifier(IdentifierProvider.java:78)
    at org.openbravo.base.structure.BaseOBObject.getIdentifier(BaseOBObject.java:195)
    at org.openbravo.service.json.DataToJsonConverter.addBaseOBObject(DataToJsonConverter.java:355)
Proposed SolutionWhen DAL grants derived access to an entity, it should also grant it for its translation entity if exists.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks design defect 0036162 acknowledgedplatform clean up openbravo.log 

-  Notes
(0078637)
shuehner (administrator)
2015-07-03 11:52

Commenting in many (maybe all) just before there is 2nd stacktrace probably triggered by the same topic:

ERROR org.openbravo.base.exception.OBSecurityException - Entity UOM is not directly readable, only id and identifier properties are readable,
property UOM.uOMTrlList is neither of these.
org.openbravo.base.exception.OBSecurityException: Entity UOM is not directly readable, only id and identifier properties are readable, property UOM.uOMTrlList is neither of these.
        at org.openbravo.base.structure.BaseOBObject.checkDerivedReadable(BaseOBObject.java:289)
        at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:251)
        at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:228)
        at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:209)
        at org.openbravo.base.structure.BaseOBObject.getDataValue(BaseOBObject.java:129)
        at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:253)
        at org.openbravo.base.structure.IdentifierProvider.getIdentifier(IdentifierProvider.java:133)
        at org.openbravo.base.structure.IdentifierProvider.getIdentifier(IdentifierProvider.java:78)
        at org.openbravo.base.structure.BaseOBObject.getIdentifier(BaseOBObject.java:195)
        at org.openbravo.service.json.DataToJsonConverter.addBaseOBObject(DataToJsonConverter.java:354)
        at org.openbravo.service.json.DataToJsonConverter.convertToJsonObjects(DataToJsonConverter.java:110)
        at org.openbravo.service.datasource.ReadOnlyDataSourceService.fetchJSONObject(ReadOnlyDataSourceService.java:142)
        at org.openbravo.service.datasource.ReadOnlyDataSourceService.fetch(ReadOnlyDataSourceService.java:70)
        at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:268)
        at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:754)
(0078827)
NaroaIriarte (developer)
2015-07-15 17:25

The problem is in the custom query of the SimpleProduct selector, there it is trying to access to UOM and that is why this error is got.
The thing is to be able to somehow specify the entities that we want to access.
(0081824)
shuehner (administrator)
2015-11-13 14:10

I think we should think on permission system here if something like the following makes sense.
If you have that 'id+identifier' are readable for some base object like UOM.

If that should also automatically allow the following.
- Access to id+identifier of the UOMTrl
- access to 'get to it' i.e. UOM.uOMTrlList
- Note: for 'current language' or 'all languages'
(0085396)
hgbot (developer)
2016-04-01 14:46

Repository: erp/devel/pi
Changeset: 840a1ebd69c8922e2f73de1df9884adc4ed6609a
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Apr 01 14:45:21 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/840a1ebd69c8922e2f73de1df9884adc4ed6609a [^]

fixed bug 28586: error logged showing translatable identifier

  Having at least one translation installed in the system, whenever a DAL
  identifier composed by translatable properties when retrieved, an error was
  logged in case the translation entity for that property was not granted to
  current role.

  This is fixed by executing the query to retrieve translation in admin mode.

  If the base property is granted at least in referred mode, its translations
  should be accessible, so it is not problematic to set admin.

---
M src/org/openbravo/base/structure/BaseOBObject.java
---
(0085510)
caristu (developer)
2016-04-08 10:19

Code review + testing OK
(0087412)
hudsonbot (developer)
2016-06-17 19:36

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
2015-01-13 15:34 alostale New Issue
2015-01-13 15:34 alostale Assigned To => AugustoMauch
2015-01-13 15:34 alostale Modules => Core
2015-01-13 15:34 alostale Triggers an Emergency Pack => No
2015-03-11 10:07 alostale Status new => acknowledged
2015-03-17 14:38 alostale Assigned To AugustoMauch => platform
2015-06-09 15:32 alostale Priority normal => urgent
2015-07-03 11:43 alostale Target Version => 3.0PR15Q4
2015-07-03 11:45 alostale Status acknowledged => scheduled
2015-07-03 11:45 alostale Assigned To platform => NaroaIriarte
2015-07-03 11:52 shuehner Note Added: 0078637
2015-07-15 17:25 NaroaIriarte Note Added: 0078827
2015-07-15 17:25 NaroaIriarte Type defect => design defect
2015-10-01 07:52 alostale Target Version 3.0PR15Q4 =>
2015-11-11 15:05 NaroaIriarte Assigned To NaroaIriarte => platform
2015-11-11 16:11 alostale Status scheduled => acknowledged
2015-11-13 14:10 shuehner Note Added: 0081824
2016-03-30 11:44 alostale Type design defect => defect
2016-03-30 11:44 alostale Target Version => 3.0PR16Q3
2016-03-30 11:44 alostale Status acknowledged => scheduled
2016-04-01 14:46 hgbot Checkin
2016-04-01 14:46 hgbot Note Added: 0085396
2016-04-01 14:46 hgbot Status scheduled => resolved
2016-04-01 14:46 hgbot Resolution open => fixed
2016-04-01 14:46 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/840a1ebd69c8922e2f73de1df9884adc4ed6609a [^]
2016-04-01 14:46 alostale Assigned To platform => alostale
2016-04-01 14:46 alostale Review Assigned To => caristu
2016-04-08 10:19 caristu Note Added: 0085510
2016-04-08 10:19 caristu Status resolved => closed
2016-04-08 10:19 caristu Fixed in Version => 3.0PR16Q3
2016-06-17 19:36 hudsonbot Checkin
2016-06-17 19:36 hudsonbot Note Added: 0087412
2017-06-01 14:53 alostale Relationship added blocks 0036162


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker