Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038761Openbravo ERPA. Platformpublic2018-06-14 13:112018-11-07 08:22
maite 
alostale 
immediatemajorrandom
closedfixed 
5
 
3.0PR18Q3 
AugustoMauch
Core
Production - QA Approved
2018-02-23
3.0PR18Q2
https://code.openbravo.com/erp/devel/pi/rev/2cd341c77062 [^]
No
0038761: having write access to a parent and one of its children orgs, sometimes it's not possible to read siblings of child one
Having an organization A, with at least 2 child nodes B and C and a role with write access to A and only one of its children (B or C):

   A
  / \
 B   C


When logging in with that role, organization C should be readable but not writable.

But randomly organization C is not visible at all.
1. Log in as Group Admin
2. In Role window select F&B España, S.A - Admin
   -> It defines write access to organizations España (A), España Norte (B) and España Sur (C)
3. In Org Access tab, select España Sur and mark it as not active
4. In User Assignment tab, grant this role to Openbravo user
5. Log out and log in again with Openbravo user
6. Select F&B España, S.A - Admin role

7. Open Sales Order window
8. Remove filters
  -> ERROR (randomly):
         - got: orders only from Norte and España organizations are displayed
         - expected: also orders from Sur organization should be visible though not writable
No tags attached.
caused by feature request 0037980 closed alostale Improve organization cache in session 
blocks backport 00387583.0PR18Q2.1 closed alostale having write access to a parent and one of its children orgs, sometimes it's not possible to read siblings of child one 
causes defect 0038787 closed alostale tests fail to compile with JDK10+ 
Issue History
2018-06-14 16:36alostaleTypedefect => backport
2018-06-14 16:36alostaleTarget Version => 3.0PR18Q2.1
2018-06-14 17:14alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17304#r17304
2018-06-15 08:08hgbotCheckin
2018-06-15 08:08hgbotNote Added: 0105153
2018-06-15 08:08hgbotCheckin
2018-06-15 08:08hgbotNote Added: 0105154
2018-06-15 08:08hgbotCheckin
2018-06-15 08:08hgbotNote Added: 0105155
2018-06-15 08:08hgbotCheckin
2018-06-15 08:08hgbotNote Added: 0105156
2018-06-15 08:08hgbotCheckin
2018-06-15 08:08hgbotNote Added: 0105157
2018-06-15 08:08hgbotStatusscheduled => resolved
2018-06-15 08:08hgbotResolutionopen => fixed
2018-06-15 08:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e90a66f0b903e01a575530f094a851a3fab31e5c [^]
2018-06-15 08:10alostaleReview Assigned Tocaristu => AugustoMauch
2018-06-15 08:10alostaleTypebackport => defect
2018-06-15 08:10alostaleTarget Version3.0PR18Q2.1 =>
2018-06-15 08:10alostaleRelationship addedrelated to 0037980
2018-06-15 08:57AugustoMauchDescription Updatedbug_revision_view_page.php?rev_id=17306#r17306
2018-06-15 09:30hgbotCheckin
2018-06-15 09:30hgbotNote Added: 0105163
2018-06-15 09:57AugustoMauchNote Added: 0105164
2018-06-15 09:57AugustoMauchStatusresolved => closed
2018-06-15 09:57AugustoMauchFixed in Version => pi
2018-06-15 09:57AugustoMauchFixed in Versionpi => 3.0PR18Q3
2018-06-15 12:13hudsonbotCheckin
2018-06-15 12:13hudsonbotNote Added: 0105180
2018-06-15 12:13hudsonbotCheckin
2018-06-15 12:13hudsonbotNote Added: 0105181
2018-06-15 12:13hudsonbotCheckin
2018-06-15 12:13hudsonbotNote Added: 0105182
2018-06-15 12:13hudsonbotCheckin
2018-06-15 12:13hudsonbotNote Added: 0105183
2018-06-15 12:13hudsonbotCheckin
2018-06-15 12:13hudsonbotNote Added: 0105184
2018-06-19 09:17alostaleRelationship addedcauses 0038787
2018-06-19 13:24hudsonbotCheckin
2018-06-19 13:24hudsonbotNote Added: 0105239
2018-11-07 08:22alostaleRelationship replacedcaused by 0037980

Notes
(0105153)
hgbot   
2018-06-15 08:08   
Repository: erp/devel/pi
Changeset: bb3ab3249a3368679ab20190fa561eb8c546cb31
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jun 14 16:44:11 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/bb3ab3249a3368679ab20190fa561eb8c546cb31 [^]

related to bug 38761: create TestConstants to share some common constants

---
M src-test/src/org/openbravo/test/base/OBBaseTest.java
M src-test/src/org/openbravo/test/security/AllowedOrganizationsTest.java
A src-test/src/org/openbravo/test/base/TestConstants.java
---
(0105154)
hgbot   
2018-06-15 08:08   
Repository: erp/devel/pi
Changeset: 283d1bb725e7442fb1a1dd44d7cfef9c97791a3f
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jun 14 16:49:46 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/283d1bb725e7442fb1a1dd44d7cfef9c97791a3f [^]

related to bug 38761: rename inner class to prevent collisions

---
M src-test/src/org/openbravo/test/base/TestConstants.java
M src-test/src/org/openbravo/test/security/AllowedOrganizationsTest.java
---
(0105155)
hgbot   
2018-06-15 08:08   
Repository: erp/devel/pi
Changeset: 6588bbc83db4a5db005892c811519d5f9a2af1ba
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jun 14 16:55:26 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6588bbc83db4a5db005892c811519d5f9a2af1ba [^]

related to bug 38761: fixed OBBaseTest

---
M src-test/src/org/openbravo/test/base/OBBaseTest.java
---
(0105156)
hgbot   
2018-06-15 08:08   
Repository: erp/devel/pi
Changeset: 5d06f2cf366feb9538344ba2405a00fee9b4c141
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jun 14 16:56:21 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5d06f2cf366feb9538344ba2405a00fee9b4c141 [^]

related to bug 38761: added test case

---
M src-test/src/org/openbravo/test/security/WritableReadableOrganizationClientTest.java
---
(0105157)
hgbot   
2018-06-15 08:08   
Repository: erp/devel/pi
Changeset: e90a66f0b903e01a575530f094a851a3fab31e5c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jun 14 17:08:07 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e90a66f0b903e01a575530f094a851a3fab31e5c [^]

fixed bug 38761: with write access to an org and one child, can't read siblings

  Having an organization A, with at least 2 child nodes B and C and a role with
  write access to A and only one of its children B, randomly cannot read info in
  C.

  Readable organizations should be all the ones that are part of the natural tree
  of each of the writable organizations. When calculating them there was a wrong
  optimization that assumed if an organization was already calculated to be part
  of the readable orgs, its natural tree would also be so there was no need to
  recalculate it.

  This is not true if it was included becuase it is part of natural tree of one
  of its writable descendants, in this case if this org is also writable its natural
  tree needs to be calculated.

  As calculating natural tree on memory is not that expensive it is not worth to
  include more complex logic to decide whether it requires to be calculated or not:
  now it will be calculated for all writable organizations.

---
M src/org/openbravo/dal/core/OBContext.java
---
(0105163)
hgbot   
2018-06-15 09:30   
Repository: erp/devel/pi
Changeset: 1062e250a41051349d62aae1dc37bc2b49af4472
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jun 15 09:30:37 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1062e250a41051349d62aae1dc37bc2b49af4472 [^]

related to bug 38761: fixed comment

---
M src-test/src/org/openbravo/test/security/WritableReadableOrganizationClientTest.java
---
(0105164)
AugustoMauch   
2018-06-15 09:57   
Code reviewed and verified in pi@e90a66f0b903
(0105180)
hudsonbot   
2018-06-15 12:13   
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/dd9c57666e17 [^]
Maturity status: Test
(0105181)
hudsonbot   
2018-06-15 12:13   
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/dd9c57666e17 [^]
Maturity status: Test
(0105182)
hudsonbot   
2018-06-15 12:13   
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/dd9c57666e17 [^]
Maturity status: Test
(0105183)
hudsonbot   
2018-06-15 12:13   
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/dd9c57666e17 [^]
Maturity status: Test
(0105184)
hudsonbot   
2018-06-15 12:13   
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/dd9c57666e17 [^]
Maturity status: Test
(0105239)
hudsonbot   
2018-06-19 13:24   
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/dd1f20cf33f6 [^]
Maturity status: Test