Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0033051 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | always | 2016-05-25 15:42 | 2016-12-20 15:16 | |||
Reporter | NaroaIriarte | View Status | public | |||||
Assigned To | NaroaIriarte | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR16Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 020004e453ca | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | alostale | |||||||
Web browser | ||||||||
Modules | Core | |||||||
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. | |||||||
Tags | Performance | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0086823) hgbot (developer) 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 --- |
(0086847) alostale (manager) 2016-05-31 08:16 |
code reviewed + tested |
(0087573) hudsonbot (developer) 2016-06-17 19:37 |
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/0dc7be081b1c [^] Maturity status: Test |
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 |
Copyright © 2000 - 2009 MantisBT Group |