Commit Graph
10472 Commits
Author SHA1 Message Date
Jacques Le Roux 950fb21881 Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

As reported by Deepak Nigam on dev ML there was a risk of NPE with userLogin w/
my last commit at r1851074  

Thanks Deepak for the report and proposed fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851350 13f79535-47bb-0310-9956-ffa450edef68
2019-01-15 13:48:33 +00:00
Jacques Le Roux 4da0b75e17 Fixed: User's name is displayed on ecommerce even after user logs out
(OFBIZ-10666)

On further investigation, I found that cookie path and domain are different 
in the methods of creating the auto-login cookie i.e. LoginWorker.autoLoginSet() 
and removing the auto-login cookie i.e. LoginWorker.autoLoginRemove().

After following changes the issue seems to be fixed:
1. Removed getMaxAge() check from the condition used in 
   LoginWorker.getAutoUserLoginId() method.
2. Corrected the path and domain in the method LoginWorker.autoLoginRemove().

Thanks: Deepak Nigam for discussion and fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851247 13f79535-47bb-0310-9956-ffa450edef68
2019-01-14 13:53:18 +00:00
Jacques Le Roux dd58f19c94 Reverted: Impossible secure and autologin cookie names when mountpoint contains
a slash inside its name
(OFBIZ-10766)

In my previous commit I reverted the initial change. As I said in the Jira
I had a second look and it's better to fix the problem at the root as I did 
initially. 

I wrote in my previous commit: "This method is used in other places where the 
name should not be changed." I checked there are no issues changing slashes to
underscores in the cookies names anywhere.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851200 13f79535-47bb-0310-9956-ffa450edef68
2019-01-13 13:31:13 +00:00
Michael Brohl acbfbfda3f Fixed: Errors and warnings in webtools' ArtifactInfo
(OFBIZ-10760)

This fixes an engine declaration mistake introduced in OFBIZ-9111, 
removes an unused service which should have been deleted in OFBIZ-8722
and removes unused services which should have been deleted in 
OFBIZ-10146.

Thanks Mathieu Lirzin for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851158 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 11:25:50 +00:00
Jacques Le Roux 9712ec2963 Improved: function parseBigDecimalForEntity is in wrong location
(OFBIZ-10689)

After I changed the method name from  ObjectType::simpleTypeConvert to
ObjectType::simpleTypeOrObjectConvert, Shikha Jaiswal noticed that I missed 
the groovy files.

Checking further I found that I also missed the simple-methods.xsd and 
ObjectTypeTests.java (though this last one was no really a problem)

Thanks: Shikha Jaiswal 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851156 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 09:29:29 +00:00
Suraj Khurana fc095b6cbd Improved:Updated 'convertUom' service, given priority to 'UomConversionDated' entity to fetch conversion factor.
(OFBIZ-10747)
In case if the factor is not available then use 'UomConversion' entity.
Thanks Amit Gadaley for reporting the issue and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851137 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 06:18:09 +00:00
Jacques Le Roux 199549e08f Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

In the method to set the autoLogin cookie, LoginWorker::autoLoginSet,
system fetches the webAppInfo by using the
method ComponentConfig::getWebappInfo. In this method, serverId and
applicationName are passed as arguments.

*WebappInfo webappInfo = ComponentConfig.getWebappInfo((String)
context.getAttribute("_serverId"), UtilHttp.getApplicationName(request));*

If the mount-point of the web app is set as an empty string, then 'root'
will be used as the application name, due to which the object webAppInfo
will come null. If the webAppInfo is null then the autoLogin cookie will
not be created and added to the response object by the system.

Thanks: Aditya for report and Mathieu Lirzin for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851074 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:26:13 +00:00
Jacques Le Roux d2485c4069 Fixed: Add session tracking mode and make cookie secure
(OFBIZ-6655)

Following "Session timeout for webapps" discussion on dev ML 
https://markmail.org/message/p6fbiojjrwb2ybxd

We decided to put back the session-timeout value in web.xml files and to remove
the line
    session.setMaxInactiveInterval(60*60); //in seconds
from ControlEventListener.java

Thanks: Deepak Nigam for report and Girish Vasmatkar for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851068 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:12:01 +00:00
Michael Brohl bcd2a6c5d7 Improved: ‘EntityOperator#getId()’ is not used in the framework
(OFBIZ-10607)

Thanks Mathieu Lirzin for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850958 13f79535-47bb-0310-9956-ffa450edef68
2019-01-10 16:19:10 +00:00
Michael Brohl 8f448f6b63 Fixed: Failed registration for virtual hosts with similar mount points
(OFBIZ-10765)

The name is now registered with the webbapp name prior to the context.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850953 13f79535-47bb-0310-9956-ffa450edef68
2019-01-10 16:07:02 +00:00
Gil Portenseigne 9b10f93948 Improved: Remove unneeded code in ‘entity’ component
(OFBIZ-10777)
Thanks Mathieu Lirzin for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850802 13f79535-47bb-0310-9956-ffa450edef68
2019-01-08 21:52:22 +00:00
Jacques Le Roux f30cf03e0b Improved: The ‘ModelFieldType’ class members should be private.
(OFBIZ-10773)

Makes the class members private and remove the default public constructor.

jleroux: All these members are only used in the class and the default public 
constructor is useless (it would be automatically added by the compiler if 
there was no other constructors, and there is one)
http://tutorials.jenkov.com/java/constructors.html#default-no-arg-constructors

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850728 13f79535-47bb-0310-9956-ffa450edef68
2019-01-08 10:57:44 +00:00
Jacques Le Roux 5f329aa988 Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

Michael spotted that I used "default-server" in r1845558:

Quoting him:

    It only works for webapps using "default-server". This name is configurable 
    in the ofbiz-component.xml and and should not be hard-coded in the code. 

This fixes it

Thanks: Michael Brohl

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850694 13f79535-47bb-0310-9956-ffa450edef68
2019-01-07 21:58:01 +00:00
Jacques Le Roux a37cf7ecd5 Fixed: Impossible secure and autologin cookie names when mountpoint contains a
slash inside its name
(OFBIZ-10766)

My previous commit was wrong this one fixes it.
I made a mistake trying to generalise changing UtilHttp::getApplicationName. 
This method is used in other places where the name should not be changed. 
Only cookies are concerned.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850685 13f79535-47bb-0310-9956-ffa450edef68
2019-01-07 20:37:10 +00:00
Jacques Le Roux a225496988 Improved: no functional change: fixes a typo in a comment
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850534 13f79535-47bb-0310-9956-ffa450edef68
2019-01-06 08:45:42 +00:00
Jacques Le Roux e7c83e76fb Fixed: Impossible secure and autologin cookie names when mountpoint contains a
slash inside its name
(OFBIZ-10766)

When you set a mountpoint which contains a slash inside its name 
(ie not only a slash as a trailer, which is possible), as it's needed with 
OFBIZ-10765, OFBiz tries to create a cookie with a slash in its name and 
that's impossible

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850530 13f79535-47bb-0310-9956-ffa450edef68
2019-01-06 08:40:38 +00:00
Gil Portenseigne 00ee97b23d Improved: Refactoring ‘EntityCondition’ - Rewrite EntityConditionListBase class
(OFBIZ-10691)

Unecessary ‘this’ has been removed and the javadoc has been
expanded. The visibility of the class has been reduced to package
only.  The ‘conditionList’ field has been renamed to ‘conditions’ and
the subclasses has been adapted.


Thanks Mathieu for the contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850385 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 15:02:45 +00:00
Gil Portenseigne a8e986c7c4 Improved: Refactoring ‘EntityCondition’ - Rewrite EntityExpr class
(OFBIZ-10691)

Remove useless ‘this’ and useless imports.  An ‘isNullField’ private
method has been addded to factorize the check of null field.
Additionally the 120 characters per line limit has been enforced.


Thanks Mathieu for the contribution



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850384 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:59:58 +00:00
Gil Portenseigne 1d0f9036bd Improved: Refactoring ‘EntityCondition’ - Rewrite EntityDateFilterCondition class
(OFBIZ-10691)

The ‘makeCondition’ methods has been simplified and the javadoc has·
been expanded.

Thanks Mathieu for the contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850383 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:59:03 +00:00
Gil Portenseigne c6524affa2 Improved: Refactoring ‘EntityCondition’ - Rewrite EntityWhereString class
(OFBIZ-10691)

The ‘equals’ method has been simplified and the javadoc has been
expanded.

Thanks Mathieu for the contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850379 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:58:16 +00:00
Gil Portenseigne c932db31f1 Improved: Refactoring ‘EntityCondition’ - Rewrite EntityFieldMap class
(OFBIZ-10691)

Useless explicit type parameters, and ‘this’ has been removed.  The·
javadoc has been expanded.

Thanks Mathieu for the contribution



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850378 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:57:31 +00:00
Gil Portenseigne 682f29be45 Improved: Refactoring ‘EntityCondition’ - Rewrite EntityConditionList class
(OFBIZ-10691)

This class is now final.  The ‘getConditionListSize’ and
‘getConditionIterator’ methods has been inlined instead of overidding
them from ‘EntityConditionListBase’.  The Javadoc has been expanded.

Thanks Mathieu for the contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850377 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:56:13 +00:00
Gil Portenseigne 31fdaaed84 Improved: Refactoring ‘EntityCondition’ - Rename EntityConditionFunction class to EntityNotCondition
(OFBIZ-10691)

‘EntityConditionFunction’ was representing an expression containing a
unary prefix condition operator or in other words a one argument
predicate.  Actually, there exists only one meaningful implementation
for this kind of operators in the SQL language which is the NOT·
predicate.  Having a ‘EntityNotCondition’ class allows us to have
simpler semantics while achieving the same completeness in term of SQL·
support.

The ‘EntityConditionVisitor’ and its documentation has been adapted to
the new class hierarchy.

Thanks Mathieu for the contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850376 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:55:17 +00:00
Gil Portenseigne 77a93fa477 Improved: Refactoring ‘EntityCondition’ - Turn EntityCondition into an interface
(OFBIZ-10691)

This is done in the spirit of favouring abstraction over
implementation.  To achieve that the following change has been made:

* The useless ‘EntityCondition#eval’ methods has been removed

* The ‘PriceServices#calculatePurchasePrice’ method has been fixed to
  refer to ‘EntityCondition#makeCondition’ instead of
  ‘EntityExpr#makeCondition’.

Additionally, the genericity of the ‘makeCondition’ methods has been
improved to allow having a hierarchy of class between the
‘EntityCondition’ type and the subtypes.

Exceptionally a ‘serialVersionUID’ has been used instead of
suppressing the 'serial' warning for the ‘EntityCondition’ interface
to satisfy both Eclipse and OpenJDK linting features which disagree on
the validity of using the ‘@SuppressWarnings’ annotation in the case
of interfaces extending ‘Serializable’.


Thanks Mathieu for the contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850373 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:50:59 +00:00
Gil Portenseigne 817378d3dc Improved: Refactoring ‘EntityCondition’ - Remove EntityConditionBase class
(OFBIZ-10691)

This is removing an abuse of inheritance for code reuse which was·
breaking Liskov substitution principle.  This has been achieved with
the following changes:

* The ‘Serializable’ interface which was implemented by
‘EntityConditionBase’ is now implemented directly by the·
‘EntityCondition’, ‘EntityConditionValue’, and ‘EntityOperator’
classes.

* ‘emptyList’ and ‘_emptyMap’ useless static members has been removed
and ‘emptyAliases’ has been move down to the ‘EntityConditionValue’
subclass.

* The ‘castBoolean’ method has been removed due to the automatic
boxing/unboxing of boolean and Boolean values which make it useless.

* ‘equals’ and ‘hashCode’ pseudo abstract methods (meaning methods
        throwing an unsupported operation exception) has been moved down to
the ‘EntityCondition’ and ‘EntityConditionValue’ sub classes.
‘Objects#equals’ and ‘Objects#hashCode’ standard methods has been
used in the EntityCondition class hierarchy instead.

* The ‘getColName’ methods has been moved down to the·
‘EntityConditionValue’ class which is the unique class using those
methods.

* The remaining static methods ‘getField’ and ‘addValue’ has been
moved to a new ‘EntityConditionUtils’ class.  The unused override of
‘addValue’ has been removed which allowed us to make this method
static.

Thanks Mathieu for the contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850372 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:50:13 +00:00
Jacques Le Roux 25721714f1 Improved: Simplify ‘entity.model.ModelField#EncryptMethod’ enum
(OFBIZ-10763)

The use of an overridden abstract method for isEncrypted is a bit overkill and 
could be replaced by a simple equality check

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850253 13f79535-47bb-0310-9956-ffa450edef68
2019-01-03 17:22:00 +00:00
Gil Portenseigne 1b02bfa7aa Improved: Extract verification of certificates in ‘RequestHandler’
(OFBIZ-10450)

No functional change. Reducte the size of RequestHandler::doRequest method.
Add somes unit tests.
Thanks Mathieu

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850250 13f79535-47bb-0310-9956-ffa450edef68
2019-01-03 16:28:27 +00:00
Aditya Sharma 5da4f7cd5e Improved: Refactor boolean returns from methods
(OFBIZ-10725)
Improved boolean returns with a single statement, replacing if blocks with the explicit boolean return.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850223 13f79535-47bb-0310-9956-ffa450edef68
2019-01-03 08:51:14 +00:00
Nicolas Malin 95f4d4b6eb Improved: Refactor ControlFilter
(OFBIZ-10449)
various improvements:
* Inheriting from HttpFilter instead of implementing Filter
* Using streams when getting the allowed paths
No functional change

Thanks to Mathieu Lirzin for this refactoring

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850171 13f79535-47bb-0310-9956-ffa450edef68
2019-01-02 15:54:01 +00:00
Aditya Sharma 1c8ecdb9cf Improved: Refactor boolean returns for UtilValidate methods
(OFBIZ-10728)
Improved boolean returns with single statement, replacing if blocks with explicit boolean return.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850043 13f79535-47bb-0310-9956-ffa450edef68
2018-12-31 12:54:38 +00:00
Jacques Le Roux 25a47db54e Improved: function parseBigDecimalForEntity is in wrong location
(OFBIZ-10689)

Missed those in previous commit

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850028 13f79535-47bb-0310-9956-ffa450edef68
2018-12-31 09:25:59 +00:00
Jacques Le Roux b7f211729f Improved: function parseBigDecimalForEntity is in wrong location
(OFBIZ-10689)

Actually this is a firts step that simply renames 
  ObjectType::simpleTypeConvert to
  ObjectType::simpleTypeOrObjectConvert
and improves the simpleTypeOrObjectConvert Javadoc

Thanks: Pierre Smits for report, Deepak Dixit for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850027 13f79535-47bb-0310-9956-ffa450edef68
2018-12-31 09:23:36 +00:00
Jacques Le Roux 9364ebd3b4 Improved: Prepare the migration to XStream 1.5
(OFBIZ-10756)

Fixes CVE-2018-17200

We currently use the UnsupportedClassConverter method in UtilXml class. 
When the 1.5 version of XStream will be available another way to handle this 
kind of things will be available and used by default. It's already possible to 
use the same with the 1.4 version of XStream with its setupDefaultSecurity method.

So this replaces the UnsupportedClassConverter in UtilXml class by 
XStream::setupDefaultSecurity method.

It's an improvement but better to backport it as much as possible

The UtilXmlTests class and its use is removed and the UnsupportedClassConverter 
method deprecated (no use OOTB)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850015 13f79535-47bb-0310-9956-ffa450edef68
2018-12-31 06:38:36 +00:00
Jacques Le Roux b43d139e26 Improved: Token Based Authentication
(OFBIZ-9833)

Just few typos and import ordering while reviewing for OFBIZ-4361

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849931 13f79535-47bb-0310-9956-ffa450edef68
2018-12-29 17:22:37 +00:00
Aditya Sharma d0eff38e8d Improved: Refactor boolean returns from methods
(OFBIZ-10725)
Improved boolean returns with a single statement, replacing if blocks with the explicit boolean return.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849846 13f79535-47bb-0310-9956-ffa450edef68
2018-12-28 12:57:49 +00:00
Jacques Le Roux d53238e430 Improved: Tomcat SSO in Cluster
(OFBIZ-10123)

Finally this was not done, noted in security.properties

Thanks: James Yong for the proposition, Michael for the discussionn in 
OFBIZ-10047

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849796 13f79535-47bb-0310-9956-ffa450edef68
2018-12-27 10:18:32 +00:00
Aditya Sharma 14b77dee1c Improved: Refactor boolean returns for TemporalExpression methods
(OFBIZ-10732)
Improved boolean returns with a single statement, replacing if blocks with the explicit boolean return.
Improves code in includesDate().


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849742 13f79535-47bb-0310-9956-ffa450edef68
2018-12-26 08:41:50 +00:00
Aditya Sharma aa44818396 Improved: Refactor boolean returns from methods
(OFBIZ-10725)
Improved boolean returns with a single statement, replacing if blocks with the explicit boolean return.
Improves code in methods:
isPrimaryKey() of GenericEntity
hasNext() and hasPrevious() of EntityListIterator
isValueActive() of EntityUtil

Additional change:
Improved return for getStartIndexFromViewIndex() method in EntityUtil. Instead of using if-else block, a ternary operator is used for improving readability.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849741 13f79535-47bb-0310-9956-ffa450edef68
2018-12-26 08:37:47 +00:00
Aditya Sharma 0abeb293a8 Improved: Refactor boolean returns for UtilHttp methods
(OFBIZ-10726)
Improves code in isJavaScriptEnabled()
Instead of using if-else block, a ternary operator is used for improving readability.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849738 13f79535-47bb-0310-9956-ffa450edef68
2018-12-26 04:56:33 +00:00
Jacques Le Roux 958d72dbcf Fixed: Having condition is ignored on queryList() and queryFirst() calls in
EntityQuery
(OFBIZ-9890)

queryList() and queryFirst() both call internal private query() method. 
This method calls delegator.findList if a normal Entity/ViewEntity is used 
(not a DVE). 

DVE has no option to include a having condition and so must opt to use 
queryIterator(). Even queryCount() can use a having condition.

Thanks: Rupert Howell and Gareth Carter for report,  Prakhar Kumar for discussion
 and Gareth Carter for the fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849693 13f79535-47bb-0310-9956-ffa450edef68
2018-12-24 14:57:08 +00:00
Aditya Sharma 4b677ab1de Improved: Refactor boolean returns for UtilHttp methods
(OFBIZ-10726)
Improved boolean returns with single statement, replacing if blocks with explicit boolean return. Improves code in checkURLforSpiders().

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849675 13f79535-47bb-0310-9956-ffa450edef68
2018-12-24 09:02:54 +00:00
Aditya Sharma 4487e3ccb0 Improved: Refactor boolean returns for UtilValidate methods
(OFBIZ-10728)
Improved boolean returns with single statement, replacing if blocks with explicit boolean return.
Improves code in isGiftCard().
Thanks Suraj Khurana for the review.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849673 13f79535-47bb-0310-9956-ffa450edef68
2018-12-24 07:51:53 +00:00
Akash Jain cefb7476d0 Fixed: Date format does not change on change of locale.
(OFBIZ-10736)
Length of date in any formate will always be 10 (2(DD)+1(/)+2(MM)+1(/)+4(YYYY))
Thanks, Aditi Patidar for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849540 13f79535-47bb-0310-9956-ffa450edef68
2018-12-22 11:26:25 +00:00
Aditya Sharma a4adaa16ce Improved: Refactor ServiceUtil.isSuccess(), isError() and isFailure() methods
(OFBIZ-10724)
Improved boolean returns with single statement, replacing if blocks with explicit boolean return.
Thanks Jacques Le Roux  for the review.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849536 13f79535-47bb-0310-9956-ffa450edef68
2018-12-22 10:44:12 +00:00
Aditya Sharma d6da4c8e17 Improved: Remove all the fk dependencies from stats entities to the business entities
(OFBIZ-10721)
stats related entities foreign key relation has been removed by Jacopo at r#1647271 and new group org.apache.ofbiz.stats introduced for stats related entity. Some remnants were still left in stats entities. 
Removed relations of Party, ContactMech and Content from ServerHit entity.
Removed relations of Content from ServerHitBin entity.
Removed relations of UserLogin from Visitor entity.
Thanks Jacques Le Roux and Deepak Dixit for the review.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849275 13f79535-47bb-0310-9956-ffa450edef68
2018-12-19 08:23:29 +00:00
Deepak Dixit 01aadcfe78 Fixed: Inconsistent behaviour of ServiceDispatcher.checkAuth
(OFBIZ-10712)


We have checkAuth method in service dispatcher class, this method performs multiple auth related check.

if all checks passed it call the modelService.makeValid method to prepare service context (line#960) but this code executed only when service definition has a permission service call.

If service does not have any permission service call then it does not call the modelService.makeValid and this may cause the service validation issue unknown parameter found.

Ideally modelService.makeValid should call irrespective to permission service check.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849193 13f79535-47bb-0310-9956-ffa450edef68
2018-12-18 16:46:34 +00:00
Deepak Dixit 089e840be8 Fixed: Relation UserLogin of entity UserLoginHistory is not unique for that entity
(OFBIZ-10515)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849192 13f79535-47bb-0310-9956-ffa450edef68
2018-12-18 16:31:55 +00:00
Deepak Dixit b7d0f87ae8 Improved: EntityUtilProperties.getProperties method should use cache.
(OFBIZ-10717)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849191 13f79535-47bb-0310-9956-ffa450edef68
2018-12-18 16:20:56 +00:00
Jacques Le Roux 2a96d29cbe Fixed: Date-find error when used in two forms of a same screen
(OFBIZ-10722)

When we have more than one form, in a screen, that use a date-find field, 
the second date-find picker is not working.

To reproduce, you can add a new form with a date-find and call it below 
FindInvoices in FindInvoices screen

Then load page [https://localhost:8443/accounting/control/findInvoices] . 
You should see  that there is no picker on the second date-find

The patch adds an id that allow renderDateFindField macro script to work for 
both fields

Thanks: Leila Mekika

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849165 13f79535-47bb-0310-9956-ffa450edef68
2018-12-18 11:20:28 +00:00
Jacques Le Roux df3e571060 Fixed: FindGeneric page broken
(OFBIZ-10711)

Due to r1848673 for "Fix or Silence various warnings" (OFBIZ-10701)
a try-with-resources was used but the Object passed in context (an 
EntityListIterator) should not be close there. It's reused in 
FindGeneric.groovy:107 by a performFind service defined in the 
dynamicAutoEntityFieldListForm String.

Thanks: Deepak Dixit for report.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848954 13f79535-47bb-0310-9956-ffa450edef68
2018-12-14 15:33:43 +00:00