Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036151Openbravo ERPA. Platformpublic2017-05-31 13:452017-09-26 15:25
vmromanos 
caristu 
normalmajoralways
closedfixed 
5
 
3.0PR17Q4 
alostale
Core
No
0036151: organization selector in process definition don't filter by role's org access
The organization selectors (OBUISEL_Selector Reference) in Process definition don't seem to apply the automatic filter over the role's org access and show by default all the records available in the client.
Create a new Reference:
* Name = My org
* OBUISEL_Selector Reference
Defined Selector:
* Table = Organization
* Selector Template

Create a new Reference:
* Name = My bp
* OBUISEL_Selector Reference
Defined Selector:
* Table = BusinessPartner
* Selector Template


Create a new Process Definition:
* UI pattern = Report
* Data access level = client/org
* Enter any class
Enter parameter "Organization":
* Mandatory = N
* DBColumnName = "inpAdOrgId" <- this makes other params to be treated as subordinate for it
* OBUISEL_Selector Reference
* Link to "My org"
Enter parameter "Business Partner":
* Mandatory = N
* OBUISEL_Selector Reference
* Link to "My bp"

Create a new menu entry and link it to the process definition.

Add the process definition to role "F&B España - Procurement", which only has access to Spanish organizations.

Login with the role "F&B España - Procurement" and launch the process definition created before
Check organization selector shows all the organization. It's wrong, it should show only spanish orgs
Check business partner selector wrongly shows US business partners in case in organization selector US org is picked.
No tags attached.
related to defect 0035124 closed inigosanchez Selectors in Process Definition invoked from menu show only records of organizations in the context organization's natural tree 
related to defect 0035401 acknowledged Triage Platform Base OBSelectorFilterSelectItem should try to retrieve ad_org_id field 
related to feature request 0033035 closed airaceburu New filters in Purchase Order Report 
related to defect 00365983.0PR17Q4 closed inigosanchez Process Definition for multirecord sets only one organization in filter parameters 
related to defect 0036863 closed caristu Custom Query Organization selectors information changes depending on the selected organization 
related to defect 0036877 closed aferraz Organization selector in Purchase Order Report should restrict the organizations that can be displayed 
related to defect 00380393.0PR18Q2 closed jarmendariz Organization filtering issues in Process Definition selectors 
png 36151_role.png (45,840) 2017-05-31 13:50
https://issues.openbravo.com/file_download.php?file_id=10816&type=bug
png

png 36151_org.png (24,030) 2017-05-31 13:50
https://issues.openbravo.com/file_download.php?file_id=10817&type=bug
png
Issue History
2017-05-31 13:45vmromanosNew Issue
2017-05-31 13:45vmromanosAssigned To => platform
2017-05-31 13:45vmromanosModules => Core
2017-05-31 13:45vmromanosTriggers an Emergency Pack => No
2017-05-31 13:50vmromanosFile Added: 36151_role.png
2017-05-31 13:50vmromanosFile Added: 36151_org.png
2017-05-31 13:51vmromanosFile Added: 36151_org_tabledir.png
2017-05-31 14:33alostaleRelationship addedrelated to 0035124
2017-06-02 11:22alostaleSummarySelectors in process definition don't filter by role's org access => organization selector in process definition don't filter by role's org access
2017-06-02 11:22alostaleDescription Updatedbug_revision_view_page.php?rev_id=15271#r15271
2017-06-02 11:22alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15273#r15273
2017-06-02 11:23alostaleFile Deleted: 36151_org_tabledir.png
2017-06-02 11:23alostaleRelationship addedrelated to 0035401
2017-06-02 11:23alostaleStatusnew => acknowledged
2017-08-10 10:21alostaleRelationship addedrelated to 0036598
2017-09-12 10:09caristuAssigned Toplatform => caristu
2017-09-12 10:09caristuStatusacknowledged => scheduled
2017-09-15 09:19caristuRelationship addedrelated to 0036863
2017-09-18 12:30hgbotCheckin
2017-09-18 12:30hgbotNote Added: 0099104
2017-09-18 12:30hgbotStatusscheduled => resolved
2017-09-18 12:30hgbotResolutionopen => fixed
2017-09-18 12:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/acafcefbd0ae1c2a35fe8073323ee4f14904432f [^]
2017-09-18 12:31caristuReview Assigned To => alostale
2017-09-18 12:41caristuNote Added: 0099105
2017-09-18 12:41caristuRelationship addedrelated to 0033035
2017-09-18 13:44caristuRelationship addedrelated to 0036877
2017-09-20 09:41hgbotCheckin
2017-09-20 09:41hgbotNote Added: 0099165
2017-09-20 09:44caristuNote Deleted: 0099105
2017-09-20 09:45caristuNote Added: 0099166
2017-09-21 16:50hudsonbotCheckin
2017-09-21 16:50hudsonbotNote Added: 0099405
2017-09-21 16:50hudsonbotCheckin
2017-09-21 16:50hudsonbotNote Added: 0099419
2017-09-22 09:29alostaleNote Added: 0099459
2017-09-22 09:29alostaleStatusresolved => closed
2017-09-22 09:29alostaleFixed in Version => 3.0PR17Q4
2017-09-22 14:22hgbotCheckin
2017-09-22 14:22hgbotNote Added: 0099492
2017-09-22 16:41hgbotCheckin
2017-09-22 16:41hgbotNote Added: 0099500
2017-09-25 10:34caristuNote Added: 0099515
2017-09-25 12:28hgbotCheckin
2017-09-25 12:28hgbotNote Added: 0099531
2017-09-25 12:28caristuStatusclosed => new
2017-09-25 12:28caristuResolutionfixed => open
2017-09-25 12:28caristuFixed in Version3.0PR17Q4 =>
2017-09-25 12:28caristuStatusnew => scheduled
2017-09-25 12:28caristuStatusscheduled => resolved
2017-09-25 12:28caristuResolutionopen => fixed
2017-09-25 12:29caristuNote Edited: 0099531bug_revision_view_page.php?bugnote_id=0099531#r15981
2017-09-25 13:11alostaleNote Added: 0099541
2017-09-25 13:11alostaleStatusresolved => closed
2017-09-25 13:11alostaleFixed in Version => 3.0PR17Q4
2017-09-25 13:58hgbotCheckin
2017-09-25 13:58hgbotNote Added: 0099547
2017-09-25 14:30hudsonbotCheckin
2017-09-25 14:30hudsonbotNote Added: 0099553
2017-09-25 14:30hudsonbotCheckin
2017-09-25 14:30hudsonbotNote Added: 0099558
2017-09-26 15:25hudsonbotCheckin
2017-09-26 15:25hudsonbotNote Added: 0099590
2017-09-26 15:25hudsonbotCheckin
2017-09-26 15:25hudsonbotNote Added: 0099593
2018-03-05 12:57vmromanosRelationship addedrelated to 0038039

Notes
(0099104)
hgbot   
2017-09-18 12:30   
Repository: erp/devel/pi
Changeset: acafcefbd0ae1c2a35fe8073323ee4f14904432f
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Sep 18 12:28:51 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/acafcefbd0ae1c2a35fe8073323ee4f14904432f [^]

fixes bug 36151: org selector in process definition don't filter by role access

  - When filtering by organization, if the organization (ORG_PARAMETER) if not specified, then filter the results taking into account just the readable organizations of the role
  - When the organization is specified, then add in the filter all the organizations in the natural tree of the specified organization but restrict to those which can be directly (not derived) accessed by the role. In the case of organization selectors, do not apply this criteria but return the readable organizations of the role

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
---
(0099165)
hgbot   
2017-09-20 09:41   
Repository: erp/devel/pi
Changeset: 16a1e0e90f6c1eaa8545ef6d026b51da69fdb8c7
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Sep 20 09:21:47 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/16a1e0e90f6c1eaa8545ef6d026b51da69fdb8c7 [^]

related to bug 36151: take into account the access level to include the * org

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
---
(0099166)
caristu   
2017-09-20 09:45   
In order to test the issue the new Purchase Order Report[1] can be used.

[1] https://issues.openbravo.com/view.php?id=33035 [^]
(0099405)
hudsonbot   
2017-09-21 16:50   
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/9750b78d3e5c [^]
Maturity status: Test
(0099419)
hudsonbot   
2017-09-21 16:50   
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/9750b78d3e5c [^]
Maturity status: Test
(0099459)
alostale   
2017-09-22 09:29   
reviewed + tested
(0099492)
hgbot   
2017-09-22 14:22   
Repository: erp/devel/pi
Changeset: d91644da48fa51a49d2ccb5b8cde8d19179035e3
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Sep 22 14:02:09 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d91644da48fa51a49d2ccb5b8cde8d19179035e3 [^]

related to issue 36151, 36863: added test case

---
M src-test/src/org/openbravo/test/AllWebserviceTests.java
A src-test/src/org/openbravo/test/datasource/OrganizationSelectorDataSourceTest.java
---
(0099500)
hgbot   
2017-09-22 16:41   
Repository: erp/devel/pi
Changeset: fa752d4ed9d1c74ef2628b90edb068b408479afb
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Sep 22 16:22:23 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fa752d4ed9d1c74ef2628b90edb068b408479afb [^]

related to bug 36151,36863: remove test case from suite due to failure in CI

---
M src-test/src/org/openbravo/test/AllWebserviceTests.java
---
(0099515)
caristu   
2017-09-25 10:34   
Repository: erp/devel/pi
Changeset: e638c65868bc
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Sep 25 10:13:24 2017 +0200
URL: https://code.openbravo.com/erp/devel/pi/rev/e638c65868bc [^]

related to issues 36151, 36863 : code review improvements for test case

---
M src-test/src/org/openbravo/test/AllWebserviceTests.java
M src-test/src/org/openbravo/test/datasource/OrganizationSelectorDataSourceTest.java
---
(0099531)
hgbot   
2017-09-25 12:28   
(edited on: 2017-09-25 12:29)
Repository: erp/devel/pi
Changeset: c8c81f25f650ad164d74f0ec8675d0e4f043b54d
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Sep 25 12:08:56 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c8c81f25f650ad164d74f0ec8675d0e4f043b54d [^]

related to issue 36151: some readable orgs were excluded

  When the _org parameter is set, the organization filter must be the intersection between the natural tree of the specified organization in that parameter and the readable organizations of the context role

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
---

(0099541)
alostale   
2017-09-25 13:11   
reviewed + tested
(0099547)
hgbot   
2017-09-25 13:58   
Repository: erp/devel/pi
Changeset: 2d57578de53ea9f94d6ce0e49d4e2f4a3ea71bf4
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Sep 25 13:39:52 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2d57578de53ea9f94d6ce0e49d4e2f4a3ea71bf4 [^]

related to issue 36151: added test case

  Added a new test case to check that the different collections that can be retrieved using the OBContext class are always returned in a new instance.

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
M src-test/src/org/openbravo/test/AllQuickAntTaskTests.java
M src-test/src/org/openbravo/test/AllTests.java
M src-test/src/org/openbravo/test/AntTaskTests.java
A src-test/src/org/openbravo/test/security/OBContextCollectionsTest.java
---
(0099553)
hudsonbot   
2017-09-25 14:30   
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/d8fd6d1ecc14 [^]
Maturity status: Test
(0099558)
hudsonbot   
2017-09-25 14:30   
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/d8fd6d1ecc14 [^]
Maturity status: Test
(0099590)
hudsonbot   
2017-09-26 15:25   
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/8fa643b4437e [^]
Maturity status: Test
(0099593)
hudsonbot   
2017-09-26 15:25   
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/8fa643b4437e [^]
Maturity status: Test