Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024390Openbravo ERPA. Platformpublic2013-07-22 12:472013-07-28 03:08
egoitz 
AugustoMauch 
urgentmajoralways
closedfixed 
5
 
3.0MP26 
shankarb
Core
No
0024390: The preferences defined with a role differente than system administrator shouldn't be exported
The preferences defined with a role different than system administrator shouldn't be exported.
If you define a preference with a role different than system administration and you define a module when defining the preference, this is exported when executing export.database with the module selected as indevelopment.
-Define a new module and check as indevelopment
-Access with a different role than system administrator.
-Define a new preference
-Select the module created
-Export with export.database

*Check that the preference has been exported but the ad_client_id and ad_org_id are differente than System (0).

No tags attached.
Issue History
2013-07-22 12:47egoitzNew Issue
2013-07-22 12:47egoitzAssigned To => AugustoMauch
2013-07-22 12:47egoitzModules => Core
2013-07-22 12:47egoitzResolution time => 1376085600
2013-07-22 12:47egoitzTriggers an Emergency Pack => No
2013-07-24 12:00AugustoMauchIssue Monitored: shankarb
2013-07-24 12:00AugustoMauchReview Assigned To => shankarb
2013-07-24 12:01hgbotCheckin
2013-07-24 12:01hgbotNote Added: 0060225
2013-07-24 12:01hgbotStatusnew => resolved
2013-07-24 12:01hgbotResolutionopen => fixed
2013-07-24 12:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7050a4c8d6649425fec6e2db60a26a5ddb3f98fc [^]
2013-07-24 21:31hudsonbotCheckin
2013-07-24 21:31hudsonbotNote Added: 0060295
2013-07-28 03:08shankarbNote Added: 0060320
2013-07-28 03:08shankarbStatusresolved => closed
2013-07-28 03:08shankarbFixed in Version => 3.0MP26

Notes
(0060225)
hgbot   
2013-07-24 12:01   
Repository: erp/devel/pi
Changeset: 7050a4c8d6649425fec6e2db60a26a5ddb3f98fc
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Jul 24 11:41:06 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7050a4c8d6649425fec6e2db60a26a5ddb3f98fc [^]

Fixes issue 24390: Only System Admin can define the module of preferences

Only the role System Admin should be able to define the ad_module_id column of the preferences (only the preferences with ad_module_id defined can be exported). This has been achieved by making that field visible only for that user (by default that field is always empty).

A server side check is not going to be done, because it is risky and it could result in proper preferences not being exported.

To fix the preference data of existing faulty preferences (preferences defined by a role other than system admin with invalid visibleat_role_id, visibleat_client_id or visibleat_org_id values) this query could be executed:

update ad_preference
set ad_module_id = null
where (visibleat_role_id is not null and visibleat_role_id != '0')
or (visibleat_client_id is not null and visibleat_client_id != '0')
or (visibleat_org_id is not null and visibleat_org_id != '0')

---
M src-db/database/sourcedata/AD_FIELD.xml
---
(0060295)
hudsonbot   
2013-07-24 21:31   
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/965b32a20794 [^]

Maturity status: Test
(0060320)
shankarb   
2013-07-28 03:08   
Code reviewed and verified in pi changeset f49b9428b38d