Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018593Openbravo ERPA. Platformpublic2011-09-22 16:312011-10-12 01:59
roklenardic 
mtaal 
normalminoralways
closedfixed 
5
 
3.0MP4pi 
Mozilla Firefox
Core
No
0018593: REST Webservice PUT method does not find objects
Here is the situation:
# we have an entity FOO that belongs to a table with access level = client/org
# we have a record in this table with the Organization set to OrgA (not *)
# our Openbravo user has the default role that has access to * and OrgA, however, the default organization is set to *
# if we use the following PUT call to this url: http://localhost:8180/openbravo/ws/dal/FOO [^]
with this content:
<Openbravo>
  <FOO id="FF8081813258436B0132584CECDC001C">
    <entityProperty>B</entityProperty>
  </FOO>
</Openbravo>

the system returns this:
<ob:error xmlns:ob="http://www.openbravo.com"><message>org.openbravo.service.web.InvalidContentException: [^] Exception when parsing entity FOO (FF8081813258436B0132584CECDC001C):Entity FOO with id FF8081813258436B0132584CECDC001C not found
Caused by: Exception when parsing entity FOO (FF8081813258436B0132584CECDC001C):Entity FOO with id FF8081813258436B0132584CECDC001C not found</message></ob:error>

and that happens because the search method does not look for the entity FF8081813258436B0132584CECDC001C within all orgs that the user has access to, but only the default one.
see above
Extend the search so that it looks for the entity requested for UPDATE/PUT within all orgs that a user has access to.
No tags attached.
Issue History
2011-09-22 16:31roklenardicNew Issue
2011-09-22 16:31roklenardicAssigned To => mtaal
2011-09-22 16:31roklenardicWeb browser => Mozilla Firefox
2011-09-22 16:31roklenardicModules => Core
2011-09-22 16:33hgbotCheckin
2011-09-22 16:33hgbotNote Added: 0041238
2011-09-22 16:33hgbotStatusnew => resolved
2011-09-22 16:33hgbotResolutionopen => fixed
2011-09-22 16:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1912a8ab2d98c41db96a97900e0b268e708115f7 [^]
2011-09-22 17:48roklenardicNote Added: 0041239
2011-09-22 17:48roklenardicStatusresolved => closed
2011-09-22 17:48roklenardicFixed in Version => pi
2011-10-12 01:59hudsonbotCheckin
2011-10-12 01:59hudsonbotNote Added: 0041694

Notes
(0041238)
hgbot   
2011-09-22 16:33   
Repository: erp/devel/pi
Changeset: 1912a8ab2d98c41db96a97900e0b268e708115f7
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Sep 22 16:32:46 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1912a8ab2d98c41db96a97900e0b268e708115f7 [^]

Fixes issue 18593: REST Webservice PUT method does not find objects
Also search the other orgs an user has access to

---
M src/org/openbravo/dal/xml/EntityResolver.java
---
(0041239)
roklenardic   
2011-09-22 17:48   
Tested PUT/UPDATE and it works now
(0041694)
hudsonbot   
2011-10-12 01:59   
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/9bd2b5c2d982 [^]

Maturity status: Test