Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029845Openbravo ERPA. Platformpublic2015-05-12 10:372015-07-06 13:04
AugustoMauch 
AugustoMauch 
highminorhave not tried
acknowledgedopen 
5
 
 
Core
No
0029845: OBQuery does not filter by readable organizations if the queried entity is Organization
If an OBQuery is used to retrieve the list of organizations, it will return organizations that are not readable by the role even if the filterOnReadableOrganizations attribute of the query is set to true.
Consider the following code:

  OBQuery<Organization> obQuery = OBDal.getInstance().createQuery(Organization.class, "");
  obQuery.setFilterOnReadableOrganization(true);
  List<Organization> organizations = obQuery.list();

The Query created to obtain the results is using this HQL FROM and WHERE clauses:

from Organization where client.id in ('23C59575B9CF467C9620760EB255B389', '0') and active='Y'

Note that the readable organization check is missing

No tags attached.
Issue History
2015-05-12 10:37AugustoMauchNew Issue
2015-05-12 10:37AugustoMauchAssigned To => AugustoMauch
2015-05-12 10:37AugustoMauchModules => Core
2015-05-12 10:37AugustoMauchTriggers an Emergency Pack => No
2015-07-06 13:04alostaleStatusnew => acknowledged
2015-07-06 13:04alostaleTypedefect => design defect

There are no notes attached to this issue.