Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011498Openbravo ERPA. Platformpublic2009-11-25 14:112010-01-21 00:00
pjuvara 
alostale 
highminorhave not tried
closedfixed 
5
2.50MP8 
2.50MP11 
Core
No
0011498: In a read only access window you cannot change the audit display
Users having read only access to a window should be able to choose whether the audit data (created by, creation date, etc.) is or is not displayed for that window.

However, when you click on the show/hide audit icon, the data is refreshed but it is refreshed in the same status as it was before.
1) you have a role that gives you read only access to a particular window
2) in that window, you want to enable Audit because you want to see the last update date and creation date
3) you press on the Audit icon in the menu that is supposed to show these fields
4) the screen is refreshed but the audit fields are still not displayed
No tags attached.
has duplicate defect 00129702.40MP13 closed adrianromero Problem showing audit in grid view 
related to defect 0011950 closed alostale API check build 260 fails 
Issue History
2009-11-25 14:11pjuvaraNew Issue
2009-11-25 14:11pjuvaraAssigned To => rafaroda
2009-12-07 20:11psarobeNote Added: 0022507
2009-12-07 20:11psarobeStatusnew => feedback
2009-12-10 12:00rafarodaNote Added: 0022621
2009-12-10 17:04pjuvaraNote Added: 0022648
2009-12-10 17:04pjuvaraStatusfeedback => new
2009-12-10 17:05pjuvaraTarget Version => 2.50MP11
2009-12-10 17:38rafarodaNote Added: 0022652
2009-12-10 17:38rafarodaAssigned Torafaroda => alostale
2009-12-10 17:38rafarodaPrioritynormal => high
2009-12-10 17:38rafarodaStatusnew => scheduled
2009-12-10 17:38rafarodaProposed Solution updated
2009-12-16 11:22alostaleNote Added: 0022856
2009-12-16 11:22alostaleAssigned Toalostale => dbaz
2009-12-21 13:09dbazNote Added: 0022979
2009-12-21 13:09dbazAssigned Todbaz => alostale
2010-01-12 11:44alostaleNote Added: 0023347
2010-01-12 11:59hgbotCheckin
2010-01-12 11:59hgbotNote Added: 0023348
2010-01-12 11:59hgbotStatusscheduled => resolved
2010-01-12 11:59hgbotResolutionopen => fixed
2010-01-12 11:59hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/efecabf0e0c31af938447c97d8aa32afcafa8e40 [^]
2010-01-12 15:01hgbotCheckin
2010-01-12 15:01hgbotNote Added: 0023360
2010-01-12 15:01hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/efecabf0e0c31af938447c97d8aa32afcafa8e40 [^] => http://code.openbravo.com/erp/devel/pi/rev/1c27fbded6473998433ca73f248ea98a6f4a9de2 [^]
2010-01-13 08:41alostaleRelationship addedrelated to 0011950
2010-01-20 13:24iperdomoNote Added: 0023611
2010-01-20 13:24iperdomoStatusresolved => closed
2010-01-20 23:25hudsonbotCheckin
2010-01-20 23:25hudsonbotNote Added: 0023633
2010-01-20 23:25hudsonbotCheckin
2010-01-20 23:25hudsonbotNote Added: 0023636
2010-01-21 00:00anonymoussf_bug_id0 => 2935921
2010-05-14 13:01adrianromeroRelationship addedhas duplicate 0012970

Notes
(0022507)
psarobe   
2009-12-07 20:11   
Sorry Paolo but we don't get the idea. Can you please explain it better?
(0022621)
rafaroda   
2009-12-10 12:00   
Reminder sent to: pjuvara

Paolo,

Can you please explain this issue further? http://wiki.openbravo.com/wiki/Bug_Reporting_Guidelines#How_to_Report_an_Issue [^]

Add also a target version.

Thanks.
(0022648)
pjuvara   
2009-12-10 17:04   
Consider this scenario:
1) you have a role that gives you read only access to a particular window
2) in that window, you want to enable Audit because you want to see the last update date and creation date
3) you press on the Audit icon in the menu that is supposed to show these fields
4) the screen is refreshed but the audit fields are still not displayed

I believe that this is due to the fact that the show/hide audit icon, although logically not a write operation, internally updates the database setting some user preferences. Since the screen is marked as read only, the preference is not set and the audit status does not change.

I can demonstrate this behavior in butler. I also demonstrated it to ALO who is aware of it.
(0022652)
rafaroda   
2009-12-10 17:38   
Audit fields are displayed in Form view but not in grid view.
(0022856)
alostale   
2009-12-16 11:22   
It seems not to be related with read-only access but with roles...

I did the following:
-Change to read-only the access for an System role.
-It still works.
-Add to Production role the Product window as read-only
-Add to Production role the Product Category window as editable
-Log in as Production role
-Test both windows in relation mode, both fail.

The problem seems to be in the front-end since the ChangeAudit backend class is never accessed when it fails.

DBA: Can you take a look to changeAuditStatusRelation method in utils.js? it seems that the ajax call some why is not executed.
(0022979)
dbaz   
2009-12-21 13:09   
In
function changeAuditStatus() {
in utils.js

I have just written alert('test'); before the submitXmlHttpRequest and always is fired... Could you please confirm that?

If is the case, the problem is in the java part...
(0023347)
alostale   
2010-01-12 11:44   
David you are right,

The problem was that the change audit servlet was defined as a process, therefore before executing it, it is checked the current role has permission to it. So if the new role doesn't have explicit access to the process, it doesn't work.

The solution is not to define this as a process, but simply as a mapping to grant access to every one regardless role. (Note that this will cause a API change without risk).
(0023348)
hgbot   
2010-01-12 11:59   
Repository: erp/devel/pi
Changeset: efecabf0e0c31af938447c97d8aa32afcafa8e40
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jan 12 11:58:22 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/efecabf0e0c31af938447c97d8aa32afcafa8e40 [^]

fixed bug 11498: In a read only access window you cannot change the audit display

---
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_PROCESS.xml
---
(0023360)
hgbot   
2010-01-12 15:01   
Repository: erp/devel/pi
Changeset: 1c27fbded6473998433ca73f248ea98a6f4a9de2
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jan 12 14:03:14 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1c27fbded6473998433ca73f248ea98a6f4a9de2 [^]

related to issue 11498
fixed integrity test 259

---
M referencedata/sampledata/Accounting_Test.xml
M referencedata/sampledata/SmallBazaar.xml
---
(0023611)
iperdomo   
2010-01-20 13:24   
Tested on pi @ rev 2abe378dc3dc
- Login as System Administrator
- Go to: General Setup > Process Scheduling > Process Monitor
- Ensure that you are in Grid Mode
- Click the 'Show Audit' icon
(0023633)
hudsonbot   
2010-01-20 23:25   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/efecabf0e0c3 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/fa6621f85351 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15942.obx [^]
(0023636)
hudsonbot   
2010-01-20 23:25   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/1c27fbded647 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/fa6621f85351 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15942.obx [^]