Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033081Openbravo ERPA. Platformpublic2016-05-30 17:382022-02-01 08:05
NaroaIriarte 
Triage Platform Base 
highminorhave not tried
acknowledgedopen 
5
 
 
alostale
Core
No
0033081: There are some sql queries that can be avoided.
There are unneeded queries in done in the "HttpSecureAppServlet.hasGeneralAccess". It is needed to improve the General Access performance by removing those unneeded queries.
For example there are two queries done when the access type is "W". With a refactor it could be improved to only one query by changing this code:

"SeguridadData.selectAccess(this, vars.getRole(), "TABLE", id).equals("0") && !SeguridadData.selectAccess(this, vars.getRole(), type, id).equals("0")"
1-As F&B Administrator go to Sales Order window.
2-Note that there are two queries, instead of one. This is (in part) because the HttpSecureAppServlet.hasGeneralAccess method, when the type is "W", does two queries.
Split the "seguridad_data.selectAccess" in different methods instead of having one for every type of access. In this way it is possible to do only one query for the type "W" instead of having two.


Performance
related to defect 0033051 closed NaroaIriarte The security check is called twice when opening a window or refreshing it 
diff patchIssue33081.diff (7,626) 2016-05-30 17:51
https://issues.openbravo.com/file_download.php?file_id=9449&type=bug
Issue History
2016-05-30 17:38NaroaIriarteNew Issue
2016-05-30 17:38NaroaIriarteAssigned To => NaroaIriarte
2016-05-30 17:38NaroaIriarteModules => Core
2016-05-30 17:38NaroaIriarteTriggers an Emergency Pack => No
2016-05-30 17:51NaroaIriarteFile Added: patchIssue33081.diff
2016-05-30 17:51NaroaIriarteStatusnew => acknowledged
2016-05-31 09:49NaroaIriarteReview Assigned To => alostale
2016-05-31 09:50NaroaIriarteNote Added: 0086851
2016-12-14 17:20alostaleTag Attached: Performance
2016-12-14 17:21alostalePrioritynormal => high
2016-12-20 11:12NaroaIriarteDescription Updatedbug_revision_view_page.php?rev_id=14072#r14072
2016-12-20 11:12NaroaIriarteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14074#r14074
2016-12-20 15:16NaroaIriarteRelationship addedrelated to 0033051
2016-12-20 17:29NaroaIriarteDescription Updatedbug_revision_view_page.php?rev_id=14085#r14085
2016-12-20 17:29NaroaIriarteProposed Solution updated
2016-12-21 09:04NaroaIriarteDescription Updatedbug_revision_view_page.php?rev_id=14095#r14095
2017-03-14 17:06NaroaIriarteAssigned ToNaroaIriarte => platform
2022-02-01 08:05alostaleAssigned Toplatform => Triage Platform Base

Notes
(0086851)
NaroaIriarte   
2016-05-31 09:50   
A patch with a proposed solution has been attached.