Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021685Openbravo ERPA. Platformpublic2012-09-19 09:572012-10-04 11:39
iperdomo 
AugustoMauch 
urgentminoralways
closedno change required 
303.5.3-1-ARCH
 
3.0MP17 
Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
Core
No
0021685: A non authenticated Component needs to have the AdminMode context by default
The development in issue 0021508 adds the support for non authenticated Components.

Before the authentication happens the only available OBContext is AdminMode, therefore it makes sense that the code executed during the Component generation should be wrapped in a AdminMode context.
* Using a non-authenticated Component, try to access the database using DAL
Wrap the Component instantiation and code generation in a AdminMode context
No tags attached.
related to feature request 0021508 closed marvintm Components require the user to be logged in to work correctly 
diff issue21685.diff (971) 2012-10-01 10:36
https://issues.openbravo.com/file_download.php?file_id=5612&type=bug
Issue History
2012-09-19 09:57iperdomoNew Issue
2012-09-19 09:57iperdomoAssigned To => marvintm
2012-09-19 09:57iperdomoWeb browser => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2012-09-19 09:57iperdomoModules => Core
2012-09-19 09:57iperdomoRelationship addedrelated to 0021508
2012-09-25 11:32marvintmWeb browserApple Safari, Google Chrome, Internet Explorer, Mozilla Firefox => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2012-09-25 11:32marvintmTarget Version3.0MP16 => 3.0MP17
2012-09-27 11:10AugustoMauchAssigned Tomarvintm => AugustoMauch
2012-09-27 11:10AugustoMauchStatusnew => scheduled
2012-09-27 11:10AugustoMauchfix_in_branch => pi
2012-09-27 15:08AugustoMauchAssigned ToAugustoMauch => shankarb
2012-10-01 09:43shankarbAssigned Toshankarb => AugustoMauch
2012-10-01 10:36AugustoMauchFile Added: issue21685.diff
2012-10-01 10:37AugustoMauchNote Added: 0052945
2012-10-03 20:01iperdomoNote Added: 0053025
2012-10-03 21:41iperdomoNote Added: 0053026
2012-10-04 11:39AugustoMauchNote Added: 0053028
2012-10-04 11:39AugustoMauchStatusscheduled => closed
2012-10-04 11:39AugustoMauchResolutionopen => no change required

Notes
(0052945)
AugustoMauch   
2012-10-01 10:37   
A patch for this issue has been attached. It will be applied to pi when it is not logically frozen for MP16.
(0053025)
iperdomo   
2012-10-03 20:01   
@AugustoMauch:
It is really need to modify HttpSecureAppServlet? There a dozens/hundreds of classes extending from this class.

I think that you should take a look into BaseKernelServlet that is a subclass of this one and handles the requests to the "KernelServlet" in Openbravo 3.
(0053026)
iperdomo   
2012-10-03 21:41   
Thinking a bit more, notice that only *some* Component generation needs to be wrapped in a AdminContext. This one are the ones with bypassAuthentication() equals true. The current associated patch is not OK.
(0053028)
AugustoMauch   
2012-10-04 11:39   
The is no need to make any change, because the generation of components is already wrapped in an admin context, see [1].

[1] https://code.openbravo.com/erp/devel/pi/file/34211605322e/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ComponentGenerator.java#l62 [^]