Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014750Openbravo ERPC. Securitypublic2010-10-01 13:112010-12-09 16:06
jonalegriaesarte 
adrianromero 
immediatemajoralways
closedfixed 
5
2.50MP21 
2.50MP232.50MP23 
Core
No
0014750: I can not access to the application when there are many organizations.
If we create many organizations we can not access the application.
- Load 422 organizations
- Try to access to Openbravo ERP.

Please ask for files to load organizations to Support Team. The error is in:

 SELECT r.UserLevel,''''||replace(replace(r.ClientList,' ',''),',',''',''')||'''' as ClientList,''''||replace(replace(r.OrgList,' ',''),',',''',''')||'''' as OrgList,r.C_Currency_ID,r.AmtApproval, r.AD_Client_ID, c.NAME, u.C_BPARTNER_ID, c.VALUE, c.SMTPHOST FROM AD_ROLE r, AD_CLIENT c, AD_USER u, AD_USER_ROLES ur WHERE r.AD_Role_ID = ? AND ur.AD_USER_ID = ? AND r.AD_CLIENT_ID = c.AD_CLIENT_ID AND r.IsActive='Y' AND c.IsActive='Y' AND r.AD_ROLE_ID = ur.AD_ROLE_ID AND ur.AD_USER_ID = u.AD_USER_ID

because you can not concatenate all the ad_org_id in OrgList variable. This sql is in src/org/openbravo/base/secureApp/Seguridad_data.xsql
No tags attached.
related to defect 00342013.0PR17Q1 closed alostale can't create import entries while changing role organization access 
Issue History
2010-10-01 13:11jonalegriaesarteNew Issue
2010-10-01 13:11jonalegriaesarteAssigned To => adrianromero
2010-10-04 17:07rafarodaIssue Monitored: rafaroda
2010-10-05 14:28shuehnerIssue Monitored: shuehner
2010-10-14 18:53hgbotCheckin
2010-10-14 18:53hgbotNote Added: 0031858
2010-10-14 18:53hgbotStatusnew => resolved
2010-10-14 18:53hgbotResolutionopen => fixed
2010-10-14 18:53hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e5c51e8fd7207f2dcb6767d607d233c3b5062b35 [^]
2010-10-14 19:00adrianromeroNote Added: 0031859
2010-10-18 17:19adrianromeroNote Added: 0031922
2010-10-18 17:19adrianromeroStatusresolved => new
2010-10-18 17:19adrianromeroResolutionfixed => open
2010-10-18 17:39hudsonbotCheckin
2010-10-18 17:39hudsonbotNote Added: 0031928
2010-10-20 18:35hgbotCheckin
2010-10-20 18:35hgbotNote Added: 0032024
2010-10-20 18:35hgbotStatusnew => resolved
2010-10-20 18:35hgbotResolutionopen => fixed
2010-10-20 18:35hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/e5c51e8fd7207f2dcb6767d607d233c3b5062b35 [^] => http://code.openbravo.com/erp/devel/pi/rev/120af24b8412fcbb8e5810d7f09c180276fca23a [^]
2010-10-20 18:40adrianromeroNote Edited: 0031859bug_revision_view_page.php?bugnote_id=0031859#r1103
2010-10-21 06:27hudsonbotCheckin
2010-10-21 06:27hudsonbotNote Added: 0032034
2010-10-22 09:59hgbotCheckin
2010-10-22 09:59hgbotNote Added: 0032097
2010-10-22 09:59hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/120af24b8412fcbb8e5810d7f09c180276fca23a [^] => http://code.openbravo.com/erp/devel/pi/rev/be9aed3260c99a58a341f7ab4fbf3209466bbaff [^]
2010-10-22 22:43hudsonbotCheckin
2010-10-22 22:43hudsonbotNote Added: 0032135
2010-11-18 12:18psarobeStatusresolved => closed
2010-11-18 12:18psarobeFixed in Version => 2.50MP23
2010-12-09 16:06anonymoussf_bug_id0 => 3133487
2016-10-13 15:07alostaleRelationship addedrelated to 0034201

Notes
(0031858)
hgbot   
2010-10-14 18:53   
Repository: erp/devel/pi
Changeset: e5c51e8fd7207f2dcb6767d607d233c3b5062b35
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Oct 04 16:58:09 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e5c51e8fd7207f2dcb6767d607d233c3b5062b35 [^]

Fixes issue 0014750: I can not access to the application when there are many organizations.
It has been modified the logic that builds the list of organizations reading directly the table AD_ROLE_ORGACCESS instead the ORGLIST and CLIENTLIST fields
The fields ORGLIST and CLIENTLIST has been marked as deprecated
The AD_ROLE_ORG_ACCESS has been shielded if the organizations list or clients list is too long

---
M src-db/database/model/triggers/AD_ROLE_ORGACCESS_TRG.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src/org/openbravo/base/secureApp/LoginUtils.java
---
(0031859)
adrianromero   
2010-10-14 19:00   
(edited on: 2010-10-20 18:40)
* Testing the issue

Now you can login in the application with more than 422 organizations
Test to log in with different users
Test changing to different roles of the user logged
Add access to new organizations and new clients to roles and verify that it works login as a user with this modified role assigned.

* Other areas affected.

Login and organizations and clients and roles functionality can be affected by this fix.
Security management.
Access to organization and roles

(0031922)
adrianromero   
2010-10-18 17:19   
The fix fails in some situations and needs to be reviewed
(0031928)
hudsonbot   
2010-10-18 17:39   
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/e5c51e8fd720 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/e1c7df1ae349 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18559.obx [^]
(0032024)
hgbot   
2010-10-20 18:35   
Repository: erp/devel/pi
Changeset: 120af24b8412fcbb8e5810d7f09c180276fca23a
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Wed Oct 20 18:35:09 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/120af24b8412fcbb8e5810d7f09c180276fca23a [^]

Fixes issue 0014750: I can not access to the application when there are many organizations.
It has been modified the logic that builds the list of organizations reading directly the table AD_ROLE_ORGACCESS instead the ORGLIST and CLIENTLIST fields
The fields ORGLIST and CLIENTLIST has been marked as deprecated
The AD_ROLE_ORG_ACCESS has been shielded if the organizations list or clients list is too long

---
M src-db/database/model/triggers/AD_ROLE_ORGACCESS_TRG.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_VAL_RULE.xml
M src/org/openbravo/base/secureApp/DefaultOptions_data.xsql
M src/org/openbravo/base/secureApp/LoginUtils.java
M src/org/openbravo/base/secureApp/Seguridad_data.xsql
M src/org/openbravo/erpCommon/ad_forms/Role.java
M src/org/openbravo/erpCommon/ad_forms/RoleCombo_data.xsql
M src/org/openbravo/erpCommon/ad_process/ClientCombo_data.xsql
---
(0032034)
hudsonbot   
2010-10-21 06:27   
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/120af24b8412 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/b5df3f5030eb [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18578.obx [^]
(0032097)
hgbot   
2010-10-22 09:59   
Repository: erp/devel/pi
Changeset: be9aed3260c99a58a341f7ab4fbf3209466bbaff
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri Oct 22 09:58:45 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/be9aed3260c99a58a341f7ab4fbf3209466bbaff [^]

Fixes issue 014750: I can not access to the application when there are many organizations.
It has been removed the wrong calculation in the security sentence

---
M src/org/openbravo/base/secureApp/Seguridad_data.xsql
---
(0032135)
hudsonbot   
2010-10-22 22:43   
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/be9aed3260c9 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/98214a9e7372 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18589.obx [^]