Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038758
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformmajorrandom2018-06-14 13:112018-06-15 09:58
ReportermaiteView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version3.0PR18Q2.1
StatusclosedFix in branchFixed in SCM revision9f8b56a41406
ProjectionnoneETAnoneTarget Version3.0PR18Q2.1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression levelProduction - QA Approved
Regression date2018-02-23
Regression introduced in release3.0PR18Q2
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/2cd341c77062 [^]
Triggers an Emergency PackNo
Summary

0038758: having write access to a parent and one of its children orgs, sometimes it's not possible to read siblings of child one

DescriptionHaving 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 with that role, organization C should be readable but not writable.

But randomly organization C is not visible at all.
Steps To Reproduce1. Login 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. Logout and login 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
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on defect 0038761 closedalostale having write access to a parent and one of its children orgs, sometimes it's not possible to read siblings of child one 

-  Notes
(0105158)
hgbot (developer)
2018-06-15 08:12

Repository: erp/backports/3.0PR18Q2.1
Changeset: 9f8b56a41406e7c136f6f8096fdf98b9c12aa546
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jun 14 17:08:07 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.1/rev/9f8b56a41406e7c136f6f8096fdf98b9c12aa546 [^]

fixed bug 38758: 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
---
(0105165)
AugustoMauch (manager)
2018-06-15 09:58

Code reviewed and verified in [1]@9f8b56a41406

[1] https://code.openbravo.com/erp/backports/3.0PR18Q2.1 [^]

- Issue History
Date Modified Username Field Change
2018-06-14 13:11 maite New Issue
2018-06-14 13:11 maite Assigned To => platform
2018-06-14 13:11 maite Modules => Core
2018-06-14 13:11 maite Resolution time => 1530741600
2018-06-14 13:11 maite Triggers an Emergency Pack => No
2018-06-14 13:12 maite Issue Monitored: networkb
2018-06-14 16:19 alostale Regression level => Production - QA Approved
2018-06-14 16:19 alostale Regression date => 2018-02-23
2018-06-14 16:19 alostale Regression introduced in release => 3.0PR18Q2
2018-06-14 16:19 alostale Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/2cd341c77062 [^]
2018-06-14 16:19 alostale Assigned To platform => alostale
2018-06-14 16:22 alostale Review Assigned To => caristu
2018-06-14 16:22 alostale Reproducibility always => random
2018-06-14 16:22 alostale Description Updated View Revisions
2018-06-14 16:26 alostale Description Updated View Revisions
2018-06-14 16:26 alostale Steps to Reproduce Updated View Revisions
2018-06-14 16:26 alostale Proposed Solution updated
2018-06-14 16:35 alostale Summary "setReadableOrganizations" produce different results, depending on the order organizations are considered => having write access to a parent and one of its children orgs, sometimes it's not possible to read siblings of child one
2018-06-14 16:35 alostale Steps to Reproduce Updated View Revisions
2018-06-14 16:36 alostale Steps to Reproduce Updated View Revisions
2018-06-14 16:36 alostale Status new => scheduled
2018-06-14 16:37 alostale Description Updated View Revisions
2018-06-14 16:38 alostale Description Updated View Revisions
2018-06-14 17:02 alostale Relationship added caused by 0037980
2018-06-15 08:10 alostale Review Assigned To caristu => AugustoMauch
2018-06-15 08:10 alostale Type defect => backport
2018-06-15 08:10 alostale Target Version => 3.0PR18Q2.1
2018-06-15 08:10 alostale Relationship deleted caused by 0037980
2018-06-15 08:12 hgbot Checkin
2018-06-15 08:12 hgbot Note Added: 0105158
2018-06-15 08:12 hgbot Status scheduled => resolved
2018-06-15 08:12 hgbot Resolution open => fixed
2018-06-15 08:12 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR18Q2.1/rev/9f8b56a41406e7c136f6f8096fdf98b9c12aa546 [^]
2018-06-15 09:58 AugustoMauch Note Added: 0105165
2018-06-15 09:58 AugustoMauch Status resolved => closed
2018-06-15 09:58 AugustoMauch Fixed in Version => 3.0PR18Q2.1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker