Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0033051 | Openbravo ERP | A. Platform | public | 2016-05-25 15:42 | 2016-12-20 15:16 |
|
Reporter | NaroaIriarte | |
Assigned To | NaroaIriarte | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR16Q3 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0033051: The security check is called twice when opening a window or refreshing it |
Description | The HttpSecureAppServlet.hasGeneralAccess security method is called twice when, for example, the sales order window is refreshed. |
Steps To Reproduce | 1-As F&B Administrator go to Sales Order window.
2-Note that there are a lot of queries, this is (in part) because the HttpSecureAppServlet.hasGeneralAccess method is being accessed twice instead once. |
Proposed Solution | -The security check must be done once instead twice, this will decrease the uneeded queries. |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0031769 | 3.0PR16Q3 | closed | NaroaIriarte | Unneeded left joins in DefaultJsonDataService | related to | defect | 0033081 | | acknowledged | Triage Platform Base | There are some sql queries that can be avoided. |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2016-05-25 15:42 | NaroaIriarte | New Issue | |
2016-05-25 15:42 | NaroaIriarte | Assigned To | => NaroaIriarte |
2016-05-25 15:42 | NaroaIriarte | Modules | => Core |
2016-05-25 15:42 | NaroaIriarte | Triggers an Emergency Pack | => No |
2016-05-25 15:44 | NaroaIriarte | Status | new => acknowledged |
2016-05-25 17:13 | alostale | Tag Attached: Performance | |
2016-05-25 17:14 | alostale | Relationship added | related to 0031769 |
2016-05-30 18:03 | hgbot | Checkin | |
2016-05-30 18:03 | hgbot | Note Added: 0086823 | |
2016-05-30 18:03 | hgbot | Status | acknowledged => resolved |
2016-05-30 18:03 | hgbot | Resolution | open => fixed |
2016-05-30 18:03 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/020004e453ca55652ce3b45a4bb91078af693905 [^] |
2016-05-31 08:16 | alostale | Review Assigned To | => alostale |
2016-05-31 08:16 | alostale | Note Added: 0086847 | |
2016-05-31 08:16 | alostale | Status | resolved => closed |
2016-05-31 08:16 | alostale | Fixed in Version | => 3.0PR16Q3 |
2016-06-17 19:37 | hudsonbot | Checkin | |
2016-06-17 19:37 | hudsonbot | Note Added: 0087573 | |
2016-12-20 15:16 | NaroaIriarte | Relationship added | related to 0033081 |
Notes |
|
(0086823)
|
hgbot
|
2016-05-30 18:03
|
|
Repository: erp/devel/pi
Changeset: 020004e453ca55652ce3b45a4bb91078af693905
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed May 25 15:57:12 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/020004e453ca55652ce3b45a4bb91078af693905 [^]
Fixed issue 33051: The "hasGeneralAccess" method is called twice
The HttpSecureAppServlet.hasGeneralAccess method is called twice
when a window is refresed or opened, for example "Sales Order".
This is not rigth because it executes more queries than needed.
To fix this a piece of code have been refactored in the "DataSourceServlet"
class.
In the "doPost" method, there is a call to the "hasAccess" method, this method
is the one which calls the "hasGeneralAccess" and this is the one that is called twice.
The problem was that inside the "doPost" method exists also a call to the "doFetch" method,
this method calls the "hasAccess" method and this calls the "hasGeneralAccess" method.
So, when the doPost method called the fetch method, the "hasGeneralAcces" method was executed
twice because of the call inside the "doPost" and the call inside the "doFetch" method.
This has been fixed by moving the code which was doing the call to "hasAccess" inside
the "doPost" method, now it has been placed after the call to the "doFetch".
---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java
---
|
|
|
|
|
|
|
|