Commit Graph
631 Commits
Author SHA1 Message Date
Jacques Le Roux 1956e731a3 No functional changes, only formatting.
While looking for other cases like r1459222 and r1509164 introduced by r1300812 and r1305309. I noticed there were a lot of wrong for loops formatting (miss a white space after for), this changes it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1511742 13f79535-47bb-0310-9956-ffa450edef68
2013-08-08 12:28:01 +00:00
Hans Bakker 7d904526a0 missing file related to r1506836
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1508362 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 09:45:18 +00:00
Hans Bakker d3248ec21b be able to set a font for pdf generation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1506836 13f79535-47bb-0310-9956-ffa450edef68
2013-07-25 07:53:29 +00:00
Adam Heath 35f83deb96 FEATURE: Add extension points to the controller login workflow; this
allows other components to automatically insert themselves, without
having to modify any existing files.  This can be used for integrating
with Jasig CAS, or with OpenID.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1497892 13f79535-47bb-0310-9956-ffa450edef68
2013-06-28 19:08:32 +00:00
Adam Heath 256a4af82b FEATURE: Allow for externalLoginKey parameter generation to be turned
off; the use for this feature will become apparent shortly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1497891 13f79535-47bb-0310-9956-ffa450edef68
2013-06-28 19:08:24 +00:00
Jacques Le Roux 5bffbb20bf A fixing patch from Leon for "Some enhancement to password change." https://issues.apache.org/jira/browse/OFBIZ-5176
This line should not have been changed, "requirePasswordChange" can come from UserLogin not only "request"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488938 13f79535-47bb-0310-9956-ffa450edef68
2013-06-03 09:34:26 +00:00
Jacques Le Roux eb9f05e7aa Add a mean to collect and show the Requests Events durations using Metrics https://issues.apache.org/jira/browse/OFBIZ-5198
Fulfill the goal with some more:
* makes the Metrics main parameters (estimationSize, estimationTime and smoothing) dynamically changeable (added in serverstats.properties)
* there is no threshold handling for event metrics


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1485601 13f79535-47bb-0310-9956-ffa450edef68
2013-05-23 07:55:14 +00:00
Adrian Crum e5099432a0 Fixed a bug in the performance metrics feature where the wrong request Map was being updated in some cases.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484145 13f79535-47bb-0310-9956-ffa450edef68
2013-05-18 16:46:01 +00:00
Adrian Crum 9bd42ec3a2 Reverted revision 1483822.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484134 13f79535-47bb-0310-9956-ffa450edef68
2013-05-18 16:12:50 +00:00
Jacques Le Roux 929a06dfd5 Improves the Metrics stats by adding a new column used only by requests. It's quite useful to measure the real (not smoothed) durations of events in notably *chained* requests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1483822 13f79535-47bb-0310-9956-ffa450edef68
2013-05-17 14:21:02 +00:00
Adam Heath 952e43cdb5 FEATURE: When calling services from an incoming http requests, allow for a different request and session attribute name to be specified.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482508 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 18:09:31 +00:00
Adam Heath ec142071b0 FEATURE: If the user gets forcibly logged out, store a message into the
request that mentions this; currently, nothing uses this, but that is
coming soon.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482132 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:31:20 +00:00
Adam Heath e787885bb6 FEATURE: Allow events to return "none"; they can already return null,
which stops processing.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482130 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:31:04 +00:00
Adam Heath da1f1f92e6 FEATURE: Allow first-visit and preprocessor events to run "none"; this
is the same as null, and will stop processing.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482129 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:30:55 +00:00
Adam Heath 2b25d70adf FEATURE: Split checkLogin, creating checkLogout, which is a helper
method that returns a valid UserLogin entity, or null if permissions or
other reasons cause it to be invalid for the current scenario.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482128 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:30:47 +00:00
Adam Heath 2ebf5a22ed FEATURE: Make isUserLoggedIn(request), loginUserWithUserLoginId(request,
response, userLoginId) and hasBasePermission(userLogin, request) public,
instead of private/protected.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482127 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:30:40 +00:00
Jacques Le Roux 44b77bdd07 A patch from Leon for "Some enhancement to password change." https://issues.apache.org/jira/browse/OFBIZ-5176
1. Make "password must be different from last passwords" function work. (--// FIXME: switching to salt-based hashing breaks this history lookup below)
2. When there's error occurs, return "requirePasswordChange" instead of "error". Then, "password change" form will not be redirected to "login" form if there's any kind of "error".
3. Fix one "deprecated" findByAnd call.
4. Return the "error" message instead of "event" message when password expires.
5. Chinese translation for "password expiration alert" and "password expired" message.

jleroux: I only reviewed (no tests) but seems good to me


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470127 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 09:00:44 +00:00
Jacques Le Roux 524aee52f9 A slightly modified patch from Sumit Pandit for "Enforce user to reset his password in a pre-defined regular interval of time." https://issues.apache.org/jira/browse/OFBIZ-5009
Reference requirement for the feature: http://markmail.org/message/sihxekwk6655t5gh#query:+page:1+mid:bcw2vva2hjxhsodq+state:results

For a user account in system, we can set password age for an additional security.
Proposed system will start suggesting to user to reset his password few days before password expiration. Then Once password expired, system will enforce him to reset his password before processing further.
Following will be control points and would be part of system configuration- 
* *Control Points -*
** Admin can enable/disable the reset password functionality.
*** -It will control by a flag in propriety file where admin can enable/disable it by setting true/false.
** Number of days in which password will expired.
*** - It will defined in propriety file so that admin can control it.
** Number of days before when password expiration alert display at user's screen.
*** - It will defined in propriety file so that admin can control it.

* *How should it processed -*
** After user logged-in, display password expiration notification message to user if his password will expire in comming days.
** After user logged-in, display change password screen, when password is expired. i.e. The difference in days since last time password updated is exceed to number of days specified in system policies. Enforce user to reset his password.

* *What will be the out-put -*
** Password is about to expire : : alert message after login.
** Password is expired : Password-Expired-Alert : alert message with reset password screen.

Following is implementation plan -

    security.properties : Provide configuration for following control points :
        Enabling / Disabling of the functionality.
        Maximum number of days within user has to change the password.
        Number of days back to password expire date, when user start getting password expiration alerts.

    Data model
        Entity name : UserLoginPasswordHistory : Existing entity.

    Business logic
        Create UserLoginPasswordHistory record when a new user is created (if configured).
        Expire and then Create UserLoginPasswordHistory record when user update existing password.
        Everytime, when user login check for password expiration. If password expired then display change password screen to user. And if password not yet expired but it is close to expire display alert message to user about its expiration.

jleroux: I just changed 
from 
if (reqToChangePwdInDays != 0) {
tp
if (reqToChangePwdInDays > 0) {

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465185 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 04:54:14 +00:00
Adrian Crum ae07fca011 Fixed a bug in one of my recent commits:
https://issues.apache.org/jira/browse/OFBIZ-5140


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1449429 13f79535-47bb-0310-9956-ffa450edef68
2013-02-24 00:27:33 +00:00
Adrian Crum 3caa1e66d3 Small improvements to ApacheFopWorker: check for file/folder existence before applying settings.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446940 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 20:43:38 +00:00
Adrian Crum 9b6b06c44a Reverting revision 1345849 because it is not thread-safe and it doesn't work.
It appears this was an attempt to create per-tenant FOP factories, but instead each tenant overwrites the previous FOP factory settings.

A proper implementation would require a FOP factory cache keyed by delegator name.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446913 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 16:31:31 +00:00
Jacques Le Roux bb024a2951 Better simpler comment
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432858 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 09:59:05 +00:00
Jacques Le Roux 4f7d1dc425 No functional change, forgot this one
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432856 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 09:52:43 +00:00
Jacques Le Roux f1fd26862c https://issues.apache.org/jira/browse/OFBIZ-5109
"Allow a whole controller or/and request/s to override a default 302 in case of redirect"

Since I did not get any feedbacks but Paul's, I decided to use 302 as default instead of 303.
The reason is like that nobody will be surprised. The same (bad for SEO) default than Java will be used.

Please test and review, and let's discuss it more if wanted...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432567 13f79535-47bb-0310-9956-ffa450edef68
2013-01-13 08:46:35 +00:00
Jacques Le Roux b14d7c1ab9 Those are not needed and even counter productive now, see discussion on dev ML http://markmail.org/message/mqe6c6qm2rofa4gg
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426605 13f79535-47bb-0310-9956-ffa450edef68
2012-12-28 18:32:23 +00:00
Scott Gray 0af4184d61 Remove a bunch of unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418650 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:06:01 +00:00
Scott Gray 5df3e3f70b Remove a bunch of unused imports, no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418646 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:03:52 +00:00
Jacques Le Roux 6dc2929e10 A patch from Sergei Biletnikov "Remote services via XMLRpc ignore the locale which is passed as the service parameter, the default locale is used forever" https://issues.apache.org/jira/browse/OFBIZ-5083
This code replaces the possible locale from parameters by default locale.

// add the locale to the context
context.put("locale", Locale.getDefault());

The solution is simple: firstly check, if we have the locale as the parameter, if no, use the default locale.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1413307 13f79535-47bb-0310-9956-ffa450edef68
2012-11-25 09:20:23 +00:00
Jacopo Cappellato 6565a78ee0 OFBIZ-5072 Committed slightly different version of the patch contributed by Rene Frauli: the delegator, dispatcher and security objects are required in the session in multitenant mode.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1411196 13f79535-47bb-0310-9956-ffa450edef68
2012-11-19 14:25:55 +00:00
Jacques Le Roux b46c7a2c06 A patch from Naofumi Fukue "Japanese patch" https://issues.apache.org/jira/browse/OFBIZ-5061
Got an issue merging GeoData_JP.xml with Subclipse, using Toirtoise solved it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1403746 13f79535-47bb-0310-9956-ffa450edef68
2012-10-30 15:48:42 +00:00
Scott Gray a2a2857bef Replace more misc. webSiteId retrievals with calls to WebSiteWorker.getWebSiteId(request). Deprecated CatalogWorker.getWebSiteId(request) and CatalogWorker.getWebSite(request).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1400626 13f79535-47bb-0310-9956-ffa450edef68
2012-10-21 11:27:10 +00:00
Jacques Le Roux cc5ddd92da Remove trailing blanks
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1395035 13f79535-47bb-0310-9956-ffa450edef68
2012-10-06 12:53:28 +00:00
Jacques Le Roux ac9f940790 A modified patch from Jyoti Sharma https://issues.apache.org/jira/browse/OFBIZ-5043
When i worked with Url Rewrite Filter, i faced the following issue:-
In case of http protocol in the url, https links on th epage were not being rewritten and when their was https url, http links were not rewritten.

The issue behind this what i found is that in RequestHandler.java encodeUrl() is not called in the above given case.
So, if we place response.encodeUrl() their the issue is resolved. 

jleroux: This makes sense since we are still in the "if (encode) {" block. I just noticed that response != null was checked above so I placed the same check before encoding

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1394995 13f79535-47bb-0310-9956-ffa450edef68
2012-10-06 10:59:12 +00:00
Jacques Le Roux d652185fce Adds a new line
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1393369 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 09:26:15 +00:00
Jacques Le Roux 899598caba Moves throwRequestHandlerExceptionOnMissingLocalRequest from general.properties to requestHandler.properties
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1393367 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 09:25:19 +00:00
Sascha Rodekamp 959321e0f1 Bug Fix: No Url encoding for get parameters (https://issues.apache.org/jira/browse/OFBIZ-2628). Thanks Wojciech Szymanowski for the hint. This Patch fixes the problems with parameters from hidden fields sending with POST method and parameters sending during "request-redirect" response type
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1392766 13f79535-47bb-0310-9956-ffa450edef68
2012-10-02 07:22:05 +00:00
Jacques Le Roux ecfc317a79 Closes "ControlServlet - Exception thrown for requests not defined by controller.xml" https://issues.apache.org/jira/browse/OFBIZ-5037
This has been tested in a custom project and work as expected it does not add any functional features for OFBiz if you don't use external requests in controllers. So should have any impacts OOTB

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1391037 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 14:49:20 +00:00
Hans Bakker 3bca44db12 OFBiz 5018: LoginWorker does not check a base permission for the root mount point
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1378020 13f79535-47bb-0310-9956-ffa450edef68
2012-08-28 08:30:10 +00:00
Jacopo Cappellato 955ae9eee1 A rather important refactoring of service related code:
* new factory interface for LocalDispatcher objects
* new factory implementation of GenericDispatcher
* new ServiceContainer container that initializes the factory (based on a configuration parameter)
* moved the getLocalDispatcher method out of GenericDispatcher and refactored (in a thread safe way) into ServiceContainer/GenericDispatcherFactory
* ServiceContainer also maintains the cache of LocalDispatchers that was managed by GenericDispatcher
* added code to ServiceContainer to deregister LocalDispatchers at shutdown: this finally fix the current code that was broken because the thread pool maintained by the JobPoller was never closed because of an issue with LocalDispatchers not being deregistered when not started by the ContextFilter
* change all code to call the ServiceContainer rather than GenericContainer to get a LocalDispatcher: now the implementation is no more directly referenced by calling code


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364952 13f79535-47bb-0310-9956-ffa450edef68
2012-07-24 09:16:26 +00:00
Jacopo Cappellato e3ad85e49f First pass of a rather relevant cleanup of service related code:
* removed the support for serviceReaderUrls for local services specified in the WEB-INF folder; this feature was not used in years and OFBiz has better mechanisms to define services in components;
* as a consequence of the previous point, a lot of code has been cleaned in the DispatchContext class; in this refactoring, I have fixed some non thread safe code (but this is only a first step and this class needs to be enhanced under this aspect)
* greatly simplified the static instance creator and constructors of ServiceDispatcher and  GenericDispatcher to reflect the changes in DispatchContext but also removed old unused code, simplified code for readability, added some comments to better document it


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364222 13f79535-47bb-0310-9956-ffa450edef68
2012-07-22 07:33:48 +00:00
Jacques Le Roux e3d7c51870 A patch from Leon for "IndexOutOfBoundsException thrown by ServerHitBin.countHit" https://issues.apache.org/jira/browse/OFBIZ-4969
This exception thrown out when initiated a "json" request.

    229156224 [http-bio-0.0.0.0-443-exec-6138] ERROR org.ofbiz.webapp.control.ControlServlet -
    ---- runtime exception report --------------------------------------------------
    Error in request handler:
    Exception: java.lang.IndexOutOfBoundsException
    Message: index: 0
    ---- stack trace ---------------------------------------------------------------
    java.lang.IndexOutOfBoundsException: index: 0
    javolution.util.FastList.add(FastList.java:228)
    org.ofbiz.webapp.stats.ServerHitBin.countHit(ServerHitBin.java:210)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364046 13f79535-47bb-0310-9956-ffa450edef68
2012-07-21 08:43:19 +00:00
Jacopo Cappellato bfbf80afdb Small enhancements to log messages
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363699 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 09:58:08 +00:00
Jacopo Cappellato 7d473126d3 removed unused imports.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363698 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 09:57:13 +00:00
Jacopo Cappellato 59aed51931 Removed some Geronimo/RMI specific code that was causing issues during system shutdown (several attempts to shutdown the RMIContainer); the code had also some tweaks that made the classes less readable; the static containerMap in ContainerLoader was breaking thread safety because the put operations were not atomic with the related add operations of the loadedContainers list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363656 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 05:41:27 +00:00
Jacques Le Roux 188353ef90 Tiny improvement in doc
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361946 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 09:16:57 +00:00
Adrian Crum 115e96c2f6 New feature - performance metrics. Web application integration.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361727 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 16:11:44 +00:00
Jacopo Cappellato 3aa85842f2 Moved the "birt" component out of framework to specialpurpose; moved all the birt reports from the applications to the birt component itself, where the application webapps are overriden to inject the reports; the end result is the same but since all these birt reports are simply a proof of concepts that cannot be used in production (for example they use hardcoded userlogin for authentication) the birt component should be probably disabled by default (but this will be discussed in the dev list).
Now it will be very easy to extract the birt component (for OFBiz Extras) or to disable it when deploying to production or when interested in sparing some hardware resources. I did some cursory tests but since the work has been challenging and rather complex I would appreciate testing help and also reviews to finds chunks of code that I could have missed and that could be moved out as well.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361130 13f79535-47bb-0310-9956-ffa450edef68
2012-07-13 09:48:32 +00:00
Adrian Crum a17298a06e Removed unused "authz" security code - https://issues.apache.org/jira/browse/OFBIZ-4839.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1360283 13f79535-47bb-0310-9956-ffa450edef68
2012-07-11 16:34:26 +00:00
Jacopo Cappellato d7d999966c Fixed a few wrong attribute names: authorization --> authz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1353686 13f79535-47bb-0310-9956-ffa450edef68
2012-06-25 18:00:01 +00:00
Jacopo Cappellato 3756ed0294 Cleaned up some code that was adding the delegator/dispatcher/security/auth objects in the user session rather than the request;
1) removed the request-maps for changeDelegator from components' controller.xml files: they were not used
2) removed CoreEvents.changeDelegator(...): not used (apart from the request-maps removed at #1)
3) removed CoreEvents.changeDispatcher(...): not used
4) cleaned up some code (related to multitenant development): now the objects are set in the request rather than the session

PS: as a consequence this will also fix the issue reported in OFBIZ-4289


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1353681 13f79535-47bb-0310-9956-ffa450edef68
2012-06-25 17:46:07 +00:00