Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014575Openbravo ERP01. General setuppublic2010-09-15 16:502010-10-14 00:00
psarobe 
adrianromero 
urgentmajoralways
closedfixed 
5
2.50MP21 
2.50MP232.50MP23 
Core
No
0014575: Table AD_ROLE: Trigger ad_role_trg is not correct
In table AD_ROLE exists the trigger ad_role_trg that creates all access automatically for every role when this is marked as manual='N'

The problem is that is not taking into account if the components (windows, forms, reports, etc) are activate or not.

Si another restriction must be put in place which is that every component must be active
1. Login as Openbravo/openbravo
2. Role: System administrator.
3. Go to Application->Windows&tabs... and deactivate the window Business partner
4. Log out and login as Openbravo/openbravo role Admin
5. Go to General setup->Security->role
6. Click new and ensure that manual flag is not checked. Save
7. Move to windows tab and check that window Busines partner is present. This is wrong

Expected behaviour: Since the window is not active, that window should have not been added to the role
No tags attached.
Issue History
2010-09-15 16:50psarobeNew Issue
2010-09-15 16:50psarobeAssigned To => adrianromero
2010-09-15 16:50psarobeStatusnew => scheduled
2010-09-15 16:50psarobefix_in_branch => pi
2010-09-16 13:39shuehnerNote Added: 0031156
2010-09-29 11:13hgbotCheckin
2010-09-29 11:13hgbotNote Added: 0031442
2010-09-29 11:13hgbotStatusscheduled => resolved
2010-09-29 11:13hgbotResolutionopen => fixed
2010-09-29 11:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a0f3f203536e7fcfdba184062577dcde295be5aa [^]
2010-09-29 11:14harikrishnanNote Added: 0031443
2010-09-29 15:40hudsonbotCheckin
2010-09-29 15:40hudsonbotNote Added: 0031473
2010-10-13 13:00psarobeNote Added: 0031804
2010-10-13 13:00psarobeStatusresolved => closed
2010-10-13 13:00psarobeFixed in Version => 2.50MP23
2010-10-14 00:00anonymoussf_bug_id0 => 3086971

Notes
(0031156)
shuehner   
2010-09-16 13:39   
Note: The pl-function ad_update_access is always called after update.database and does insert 'missing' access entries for automatic roles. If an isactive filter is added to the trigger most likely that function (and perhaps others, unknown) need to be changed also with a similar filter.
(0031442)
hgbot   
2010-09-29 11:13   
Repository: erp/devel/pi
Changeset: a0f3f203536e7fcfdba184062577dcde295be5aa
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Wed Sep 29 14:42:51 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/a0f3f203536e7fcfdba184062577dcde295be5aa [^]

Fixes issue 14575: Table AD_ROLE: Trigger ad_role_trg is not correct

---
M src-db/database/model/functions/AD_UPDATE_ACCESS.xml
M src-db/database/model/triggers/AD_ROLE_TRG.xml
---
(0031443)
harikrishnan   
2010-09-29 11:14   
Steps to test:
*As Sytem Administrator Go to Windows, Tabs, and Fields and select "Business Partner" window and deactivate it.
*As Openbravo admin go to Roles window and create a new role,make sure that the manual check box is set to true.
*Note it in the Window Access tab that the deactivated Business partner window wont appear.
*Similarly repeat the steps for the Forms,Process,WorkFlow.

Root Cause:

*Before the isActive condition is not checked.

Impact:

*Ad_Role_Trg is a trigger executed when their is action take place in Ad_Role table.This is tested.
*Ad_Update_Access is called when we run update.database ant target,for updating the roles and its access.
(0031473)
hudsonbot   
2010-09-29 15:40   
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/a0f3f203536e [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/cb186de791e3 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18453.obx [^]
(0031804)
psarobe   
2010-10-13 13:00   
Closed and tested by code review and following the steps