(OFBIZ-10460)
The setLocaleFromBrowser request map defined in common-controller.xml has an
attribute of auth=false
While the service associated with it in framework/common/servicedef/services.xml
has an attribute of auth=true.
jleroux: this was missing in the initial patch. At OFBIZ-9264 the description is
"it sets the time zone of the user logged in to it's browser time zone."
So being logged in seems needed, hence better to set auth=true everywhere
Thanks: Mathieu Lirzin for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835586 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10008)
No configurations is available to disable usage of EntitySyncRemove.
And it's creating problems when having a large database and frequent delete
operations.
saveEntitySyncRemoveInfo is used to create EntitySyncRemove records in
GenericDelegator.removeValue() and removeByPrimaryKey().
This adds a mechanism to prevent the usage of EntitySyncRemove by adding a
property in general.properties file used to configure in entityengine.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835296 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10458)
A new Junit test is implemented to validate that no duplicates are present.
Groovy service has been refactored to use a more functional style
Thanks Mathieu Lirzin for reporting and providing the patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835282 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10453)
There is a lot of repetitive code in ConfigXMLReader.
Using a functional interface as a parameter of a generic algorithm avoids those
repetitions.
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834662 13f79535-47bb-0310-9956-ffa450edef68
OFBIZ-10438
The request-map element has a new method attribute to control a uri be called by GET or POST or all.
Thanks: Mathieu Lirzin for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834389 13f79535-47bb-0310-9956-ffa450edef68
authentication
(OFBIZ-10307)
This reverts the work done previously for OFBIZ-9833 and OFBIZ-10206
Most parts of it will actually be reused later in a patch. By reverting it will
allow to provide a patch for others to review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1833510 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10413)
`CommonEvents::setFollowerPage` contains two unused variable definitions.
After basic search I found that this request handler is used only in
`webapp/partymgr/controller.xml`
However I was unable to understand its purpose, so I have added a comment to add
some kind of docstring.
jleroux: this event method is never used because the pushPage request map is
also never used. So we can get rid of the whole.
At the same time, fixes a typo in comment an remove an useless import
Thanks: Mathieu Lirzin for initial reporting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1833505 13f79535-47bb-0310-9956-ffa450edef68
<field><check disabled=true/></field>
and default value for attribute will be false.
(OFBIZ-10367)
Thanks Pawan Verma for reporting the improvement and providing patch for that.
Thanks James Yong for testing the work.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1833231 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10389)
Execution of the first visit events depends on the trackVisit function
In RequestHandler.java file
if (this.trackVisit(request) && session.getAttribute("_FIRST_VISIT_EVENTS_") == null) {
// execute first visit event
}
trackVisit function does not honor the default controller request
(in this case, cms) So, we should improve the code of trackVisit to honor
default controller request.
Thanks: Swapnil M Mane
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832944 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10420)
Prevents the session fixation by making Tomcat generate a new jsessionId
(ultimately put in cookie). Only do when really signing in to avoid unnecessary
calls
This improves the way it's done by using request.changeSessionId() instead of
creating a brand new session. So there is no possible side effects on client and
no need to set initial request info (using setInitialRequestInfo)
Thanks: Taher for asking about it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832756 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10420)
Fixes a session fixation security issue discovered by a client with the security
audit tool "IBM Security AppScan Enterprise , Version : 9.0.3.7"
Prevents the session fixation by making Tomcat generate a new jsessionId
(ultimately put in cookie).
Only do when really signing in to avoid unnecessary calls
Though if the client has disabled the use of cookies, then a session will be
new on each request, not a good choice on client side!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832662 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10390)
No functional changes while working on EntitySync-manual.adoc and checking the
opportunity of existing debug log (it's a bit verbose, but it's OK as is)
Simply uses a multi-catch where possible
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832411 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7598)
If list inside form doesn't contain data, then header row should not render from
better UI perspective and proper message should be shown to user.
Get to catalog/control/EditProductGoodIdentifications with eg
productId=ID:GZ-1006 for a test
Thanks: Suraj
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832401 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9846)
Replaced inline js from renderFormClose macro to external js in OfbizUtils.js
Done following:
Used custom data attributes: data-focus-field to define focus field for the form.
Used attribute selector to find elements and set focus on the particular field.
Added "requireValidation" class to all the forms with required fields.
Used the class selector to find such forms & attached Validator plugin to it.
Steps to verify:
At add ProdCatalog page: https://localhost:8443/catalog/control/EditProdCatalog
Dialogs:
New Example dialog on Find Example page
Go to Find Example page https://localhost:8443/example/control/FindExample
Click on New Example button
Validations should work in dialog on form submit.
Additional Changes:
Link for dialog in HtmlMenuMacroLibrary still had the inline code.
Replaced the code with external js code.
Validations on forms rendered with renderSubmitField macro from
HtmlFormMacroLibrary.ftl seems not working
https://demo-trunk.ofbiz.apache.org/partymgr/control/NewEmployee, will create
a separate ticket for it.
jleroux:
I agree about NewEmployee issue
As mentionned Aditya themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl was
redundant, removed
I also removed commented out code in rainbowstone HtmlMenuMacroLibrary.ftl
(left by Aditya while working on the issue I guess)
Thanks: Aditya
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832307 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10410)
Instead of relying on manual synchronisation, use a concurrent map for caching
loaded classes.
Inline private `invoke` delegate which intent was fuzzy.
Spread arguments when calling `Method::invoke` and `Class::getMethod`.
jleroux: interesting, it's the 1st use in OFBiz of the "::" syntax for calling
methods
(cf. https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.13-500)
I note that the string "::" is used in many places as a separator, notably
in caches, as cache key separator but this should not be confusing.
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832199 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10412)
UtilValidate class contains a `isEmpty` method both for `CharSequence` and for
`String` types but since the first is an interface for the other and that the
implementation are the same we don't need to keep the one for the concrete type.
Additionnaly I have removed the unused Generic type for the remaining
implementation.
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832170 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10411)
To define boolean values, some ad-hoc enumeration of "true" and "false" are
repeatedly used. Since XML Schema defines a standard boolean datatype
better to use it.
For now only `site-conf.xsd` is fixed
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831930 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10245)
This commit introduce a new way to manage file transfer in OFBiz.
Inspired by mailing communication event management, a new communicationEventTypeId is created ('FILE_TRANSFER_COMM').
Such commEvent with classics : partyIdFrom/partyIdTo/contactMechIdTo/entryDate etc. are analysed by a job (like sendEmailDated), to send associated contents to a configured FTP/SFTP/FTPS server. If failure happens, it is catched and stored in communicationEvent, waiting for a new try.
For this purpose :
A new contactMechTypeId is introduced (FtpAddress), with its corresponding table. This contactMech store needed information for basic user/password authentication (server url and protocol, port, username, password, etc.)
A new service sendFileTransferDated that will look for pending file transfer and call following service.
A new service sendCommEventAsFtp that take a selected commEvent, check its structure and manage its status after trying the associated content file transfers.
A new service sendContentToFtp, that take a content and transfer it to a given FtpAddress.
A seca createCommEventFromFtpTransfer on sendContentToFtp to manage plural content file transfer, creating children communicationEvent to follow each content transfer separately (only for several content transfers).
A new Interface FtpClientInterface, with the 3 implementations of FTP, FTPS (To Implement), SFTP clients to manage Ftp connection and transfer.
A new property file to enable and manage redirection for testing purpose.
With this implementation, creating a communicationEvent, with a FtpAddress contactMechIdTo, and sendFileTransferDated job planned, the file is transfered to the ftp : communication event status set to COM_COMPLETE, if error occured the communication event status is set to COM_BOUNCED with error message on communicationEvent note.
Thanks Rishi for your feedbacks
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831867 13f79535-47bb-0310-9956-ffa450edef68
attribute
(OFBIZ-10406)
While calling checkProductRelatedPermission, if permission is failed ten
fail-property tag uses ${checkActionLabel} which is not handled properly in
MessageElement.java.
There are 2-3 other occurrences as well of such type but not in working
condition.
Thanks: Suraj
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831831 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10390)
The current EntitySync documentation in wiki is POS oriented so somehow
deprecated.
I have recently worked on a project with EntitySync and collected as much
possible information.
I also got David E. Jones's agreement to reuse the part on EntitySync in his
2006 "Apache OFBiz Advanced Framework - Training Video Transcription" document.
So this is a new replacing asciidoc document, it's a WIP...
Thanks: David for agreement on reusing his doc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830972 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10282)
Thanks to Arun Patidar for reporting and review.
Thanks to Suraj Khurana for providing patch for the improvement.
Thanks to Jacques for discussion and finalizing the work.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830545 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10369)
The events contained in the controller configuration for first-visit, pre-post processor and before-after login are executed in arbitrary order rather than the defined order.
If we define an event configuration as follow:
<after-login>
<event name=keepCartUpdated type=java path=org.apache.ofbiz.order.shoppingcart.ShoppingCartEvents invoke=keepCartUpdated/>
<event name=restoreAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=restoreAutoSaveList/>
<event name=saveCartToAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=saveCartToAutoSaveList/>
</after-login>
We wait that OFBIz run keepCartUpdated, restoreAutoSaveList and after saveCartToAutoSaveList event but the HashMap who organise them return arbitrary order and can return saveCartToAutoSaveList, keepCartUpdated and restoreAutoSaveList. Convert the HashMap to LinkedHashMap help to keep the loaded order.
Thanks to Vikas Mayur for solve this issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830303 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10369)
The events contained in the controller configuration for first-visit, pre-post processor and before-after login are executed in arbitrary order rather than the defined order.
If we define an event configuration as follow:
<after-login>
<event name=keepCartUpdated type=java path=org.apache.ofbiz.order.shoppingcart.ShoppingCartEvents invoke=keepCartUpdated/>
<event name=restoreAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=restoreAutoSaveList/>
<event name=saveCartToAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=saveCartToAutoSaveList/>
</after-login>
We wait that OFBIz run keepCartUpdated, restoreAutoSaveList and after saveCartToAutoSaveList event but the HashMap who organise them return arbitrary order and can return saveCartToAutoSaveList, keepCartUpdated and restoreAutoSaveList. Convert the HashMap to LinkedHashMap help to keep the loaded order.
Thanks to Vikas Mayur for solve this issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830301 13f79535-47bb-0310-9956-ffa450edef68