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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033051
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2016-05-25 15:422016-12-20 15:16
ReporterNaroaIriarteView Statuspublic 
Assigned ToNaroaIriarte 
PrioritynormalResolutionfixedFixed in Version3.0PR16Q3
StatusclosedFix in branchFixed in SCM revision020004e453ca
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033051: The security check is called twice when opening a window or refreshing it

DescriptionThe HttpSecureAppServlet.hasGeneralAccess security method is called twice when, for example, the sales order window is refreshed.
Steps To Reproduce1-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.
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00317693.0PR16Q3 closedNaroaIriarte Unneeded left joins in DefaultJsonDataService 
related to defect 0033081 acknowledgedTriage Platform Base There are some sql queries that can be avoided. 

-  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
Powered by Mantis Bugtracker