Commit Graph
273 Commits
Author SHA1 Message Date
Jacques Le Roux 923b42c2da Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Fixes possible null dereferencings in
EbayHelper::createPayment,
AbstractPricatParser::writeCommentsToFile
SolrProductSearch::getSideDeepCategories
WebPosEvents::getProductType
2021-12-05 09:55:08 +01:00
Jacques Le Roux 7ab9d05412 Improved: Handle remaining checkstyle errors (OFBIZ-12169)
Fixes wrong methods names in EntityFunction class
Forgot the plugins while working on smthg else :/
2021-10-17 11:42:38 +02:00
Jacques Le Roux 190e816364 Fixed: Add http to https redirect rule for ofbiz.apache.org (OFBIZ-10590)
This prevented to run the stable demo, hence the next, weirdly the trunk had
not this problem. Anyway better safe than sorry... Maybe related to Gradle
version or rather libs loaded?

The reason why the stable (and old) demos were not running is because the
EntitySaxReaderTests did not pass
2021-07-20 07:47:25 +02:00
Jacques Le Roux 6106277bb4 Improved: Add global web.xml to simplify session timeout configuration (OFBIZ-12255)
Currently, session timeout is configured in apps separately, but session is
shared globally, so the smallest one take effects, and it will not take effect
separately for different apps.

Then it is both inconvenient and confusing to increase session timeout value,
as all values in those files need to be updated.

A global web.xml is needed, to simplify session timeout configuration.

Thanks: Xin Wang
2021-06-22 08:52:44 +02:00
Wiebke Pätzold 9465c20566 Improved: Adds newline at the end of the file (OFBIZ-12169) 2021-02-15 17:27:01 +01:00
Jacques Le Roux e964d61724 Improved: Default ordering of webapps titles in main menu (OFBIZ-12166)
This 1st step sorts the plugins. We need to discuss more...
2021-02-14 21:12:52 +01:00
holivier 30aa0132e6 Documented: migration to help system using asciidoc files (OFBIZ-11587)
Add <set field=helpAnchor... in CommonScreens for plugins where it's
not present. With this commit all OFBiz plugins application help go to the html
generated from asciidoc files
2020-10-23 18:34:33 +02:00
Suraj Khurana 26ddcc0c8e Improved: Corrected line is longer than 150 characters checkstyle issues in plugins component.
(OFBIZ-11921)
Also fixed some other extra space and naming related checkstyle issues observed.
Thanks Jacques for review.
2020-09-04 12:27:09 +05:30
James Yong 1c9f2ab9c6 Improved: multi-block attribute for html-template tag (OFBIZ-11686)
Not important to track server hits for getJs request
2020-08-25 21:58:26 +08:00
Pawan Verma 5545b13b13 Improved: Replace .size() == 0 with isEmpty() in Java files(OFBIZ-11944)
Thanks, priya for the report and patch and jacques for the review.
2020-08-22 19:18:38 +05:30
Suraj Khurana 1207d24062 Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in plugins component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements.
Thanks jacques for finalizing Javadoc pattern during this effort.
2020-08-22 13:22:19 +05:30
Suraj Khurana 403fc39d7f Improved: Added missing Javadocs for some methods, this is required for all classes which looks like designed for extension (can be subclassed).
(OFBIZ-11947)
This is done for plugins component. Also corrected some variables as per naming convention best practices.
Thanks Jacques for review.
2020-08-17 12:29:08 +05:30
Priya Sharma 04b8809124 Improved: Removed unused imports from Java files for fixing checkstyle errors
(OFBIZ-11930)
Thanks: Priya Sharma
2020-08-07 18:55:50 +05:30
Suraj Khurana b65d9c94df Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-plugins into trunk 2020-08-03 10:08:06 +05:30
Suraj Khurana 30f796146c Improved: Corrected some line is longer than 150 characters checkstyle issues. Also fixed some extra spaces and naming conventions related checkstyle issues.
(OFBIZ-11921)
2020-08-03 10:07:16 +05:30
Jacques Le Roux 68e603fb4b Fixed: getJs unknown in Webpos (OFBIZ-11932)
R17 is not affected
2020-08-01 13:08:53 +02:00
Suraj Khurana 78801df453 Improved: Updated case indentation to 0 for all switch statements in plugins component. Also done formatting changes as per checkstyle best practices.
(OFBIZ-11904)
2020-07-25 13:48:25 +05:30
Jacques Le Roux a0f7e77e77 Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
Removes all error*.jsp reference, no longer used
2020-07-20 19:27:23 +02:00
Jacques Le Roux 899d3061fe Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
The ecommerce and webpos controller missed an errorpage reference.
All other controllers either use directly the common-controller or indirectly by
including controller/s that include the common-controller
2020-07-18 11:15:18 +02:00
Suraj Khurana 2144763bc0 Improved: Corrected all checkstyle formatting issues: 'typecast' is not followed by whitespace in plugins component.
(OFBIZ-11887)
2020-07-18 12:26:04 +05:30
Jacques Le Roux df8b8213ff Improved: User Error.ftl everywhere it's not yet used (OFBIZ-11890)
Those are no longer needed, replaced by error.ftl
2020-07-16 17:14:42 +02:00
Jacques Le Roux a50442d121 Improved: User Error.ftl everywhere it's not yet used (OFBIZ-11890)
At https://markmail.org/message/n76cchtriexxmgm7 I asked

Why having the ftl handlers only in webtools controller? BTW it makes the XSD
documentation awkward because it speaks about the ftl handlers being in
handlers-controller.xml
Why not using error.ftl in common-controller.xml instead of error.jsp?
Same question for plugins.

And answered

I believe we could change all that and definitely get rid of error.jsp
(error.ftl is already in all supported releases branches)
2020-07-15 20:56:23 +02:00
Suraj Khurana e7ead3697f Improved: Corrected all checkstyle formatting issues: Line has trailing spaces in plugins component.
(OFBIZ-11880)
Thanks Jacques for review.
2020-07-13 14:14:42 +05:30
Suraj Khurana b18669cddc Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for plugins component.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.

'{' is not followed by whitespace.

'}' is not followed by whitespace.

'}' is not preceded with whitespace.

'typecast' is not followed by whitespace.

'try' is not followed by whitespace.

';' is preceded with whitespace.
2020-07-11 14:27:09 +05:30
Suraj Khurana ae31c01fa7 Improved: Change resources with proper naming convention in all plugin components.
(OFBIZ-11739)
Also, made MODULE as private data member of class instead of public. Thanks Jacques for review.
2020-05-29 13:14:02 +05:30
James Yong ca5e6b45f1 Improved: Apply multi-block attr to each application (OFBIZ-11706)
For remaining plugin applications.
2020-05-16 13:37:43 +08:00
Jacques Le Roux 208ef1b1be Improved: replaces module by MODULE everywhere 2020-04-06 12:14:23 +02:00
Jacques Le Roux d267d161e0 Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.
(OFBIZ-11470)

As reported by OWASP ZAP:
A cookie has been set without the SameSite attribute, which means that the
cookie can be sent as a result of a 'cross-site' request. The SameSite attribute
is an effective counter measure to cross-site request forgery, cross-site script
inclusion, and timing attacks.

The solution was not obvious in OFBiz for 2 reasons:

1. There is no HttpServletResponse::setHeader. So we need to use a filter
  (SameSiteFilter) and even that is not enough because of 2:
2. To prevent session fixation we force Tomcat to generates a new jsessionId,
ultimately put in cookie, in LoginWorker::login. So we need to add a call to
SameSiteFilter::addSameSiteCookieAttribute in
UtilHttp::setResponseBrowserDefaultSecurityHeaders.
2020-03-20 17:51:00 +01:00
Michael Brohl d5731824c2 Implemented: Remove the user login security question.
(OFBIZ-11244)

Thanks Wiebke Pätzold for providing the patch.
2020-03-13 17:35:45 +01:00
Mathieu Lirzin 1158664ba3 Fixed: Add XML declaration in “web.xml” files (OFBIZ-6993)
These declarations avoid SAXParseException traceback when parsing web.xml
the first time in WebappUtil.parseWebXmlFile

A schema conformance issue has been fixed in ecommerce “web.xml”.
2019-12-07 22:52:30 +01:00
Jacopo Cappellato e49b345808 Fixed: Add missing view permissions checks to various screens. 2019-11-15 19:24:22 +01:00
Jacques Le Roux fbbd9d893f Improved: no functional change
In r1868022 I added the POS_SALES_CHANNEL was suggested in OFBIZ-10965. Actually
that was wrong. Tt's already in PosTypeData.xml though with a wrong sequenceId

This fixes it


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1868023 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 14:23:17 +00:00
Mathieu Lirzin 237a2fc8f7 Improved: Do not use ‘UtilMisc#toList’
(OFBIZ-11140)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863390 13f79535-47bb-0310-9956-ffa450edef68
2019-07-19 13:38:49 +00:00
Jacques Le Roux f3c3271d12 Improved: Use Groovy Truth instead of UtilValidate Class in Groovy
(OFBIZ-11064)

As we all know, Groovy is a powerful language with great built-in functions. 
Groovy Truth[1] is one of them, which is not used properly in our code base. 
We have used UtilValidate Class to validate arguments for Empty or NotEmpty, 
which can easily be done in groovy with built-in functionality[1].
 
Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }
Groovy Built-in Code: if (locations) { ... }
 
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth
 
We need to careful for some points while we change this:
Like:
maxRetry = 0
if (!maxRetry)
{  // Not set, use a default  maxRetry = -1 }

Because groovy evaluates zero to be false, it wouldn't be possible to set
maxRetry to zero.  So it's best not to use groovy truth for null-checks on
numbers in some cases. 
 
Thanks: Pawan Verma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 10:36:16 +00:00
Mathieu Lirzin 9354ac2997 Improved: Remove redundant type declarations
(OFBIZ-10937)

Since Java 1.7, when defining generic types it is unnecessary to
redefine those types in the constructor when it is already done in the
declared type.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860025 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 23:42:00 +00:00
Jacques Le Roux 94c278ed63 Fixed: Touch F8 in webpos does not work and generate an error
(OFBIZ-11010)

Adds missing data for POS_SALES_CHANNEL fix this issue, was removed in r1754402.

Thanks: Pawan Verma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1859012 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 14:32:35 +00:00
Suraj Khurana 62c2ce7ce6 Fixed: Shortkeys missing on WebPOS.
(OFBIZ-10961)
It was broken after jQuery update on rev #1850712.
Thanks Padmavati Rawat for reporting and Rohit Koushal for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1858289 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 16:36:43 +00:00
Jacques Le Roux 844fc542d8 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-plugins/trunk@1851068 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:12:01 +00:00
Aditya Sharma baabf6b25d Improved: Replace jQuery.bind() with jQuery.on()
(OFBIZ-10758)
As of jQuery 3.0, .bind() has been deprecated. It was superseded by the .on() method for attaching event handlers to a document.
Additional change:
Improved boolean returns with single statement, replacing if blocks with explicit boolean return.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1850712 13f79535-47bb-0310-9956-ffa450edef68
2019-01-08 05:08:40 +00:00
Jacques Le Roux 6a9ede0945 Improved: Themes can't be changed in webpos
(OFBIZ-10767)

Following this discussion on dev ML I decided to test it on Ubuntu in my Windows 
7 VM and it works there. 
Just that you don't automatically get back to the webpos page when changing theme


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1850552 13f79535-47bb-0310-9956-ffa450edef68
2019-01-06 13:51:34 +00:00
Jacques Le Roux f16195f359 Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

Renames "keep-autologin-cookie" to "use-autologin-cookie", and only create 
Autologin cookies when needed. No need to create Autologin cookies in 
applications that don't need it.

Don't pass webAppName to LoginWorker::getSecuredUserLoginId, that can be handled
with improved LoginWorker::getSecuredLoginIdCookieName

Removes LoginWorker::autoLogoutCleanCookies, no longer needed since only those
needed are created and kept (1 year at least after creation).

For both autoLogin and securedLoginId cookies sets the path to the application.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1845558 13f79535-47bb-0310-9956-ffa450edef68
2018-11-02 09:46:42 +00:00
Suraj Khurana 53ff3ff66e Fixed: Added missing import.
(OFBIZ-10314)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1844966 13f79535-47bb-0310-9956-ffa450edef68
2018-10-27 13:21:20 +00:00
Suraj Khurana 6e84e0983f Fixed: Multiple records are shown in search modal in webpos.
(OFBIZ-10314)
Thanks Archana Asthana for reporting and Shikha Jaiswal for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1844957 13f79535-47bb-0310-9956-ffa450edef68
2018-10-27 12:47:45 +00:00
Jacques Le Roux 0cd8756918 Improved: Remove few request-map "edit" attributes in controllers
(OFBIZ-10608)

As documented, currently

    Reserved for future use (not used yet).

I checked, it's still not implemented. So no need to confuse people for now, 
better to remove until it's really used.




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1844744 13f79535-47bb-0310-9956-ffa450edef68
2018-10-24 08:57:03 +00:00
Aditya Sharma 4703e7f373 Fixed: Webpos Keyboard Shortcut keys does not work correctly
(OFBIZ-7945)
Updated wrong function calls in switch case of activateHotKeys(). As support for Pin Payment transactions is still to be added under OFBIZ-5241. Commented code for Pin payment transaction and updated other shortcuts accordingly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1841650 13f79535-47bb-0310-9956-ffa450edef68
2018-09-22 05:52:53 +00:00
Suraj Khurana 0d27498587 Improved: Arranged webpos UI labels in alphabetic order.
(OFBIZ-7320)
Thanks Shivangi for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1840665 13f79535-47bb-0310-9956-ffa450edef68
2018-09-12 11:58:17 +00:00
Jacques Le Roux 83bf75872f Improved: Renames setLocaleFromBrowser to SetTimeZoneFromBrowser
everywhere it's needed.
(OFBIZ-10472)

FORGOT IT in WEBPOS!



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1840446 13f79535-47bb-0310-9956-ffa450edef68
2018-09-10 09:52:43 +00:00
Suraj Khurana ac6ba4388b Fixed: Party Search doesn't consider Billing Address and Shipping Address checkbox in WebPos.
(OFBIZ-7709)
Thanks Vishal for your patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1837845 13f79535-47bb-0310-9956-ffa450edef68
2018-08-11 06:18:18 +00:00
Suraj Khurana 99fb5202d3 Fixed: Not able to select Virtual Product in WebPos.
(OFBIZ-7719)
Thanks Vishal for your patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1837796 13f79535-47bb-0310-9956-ffa450edef68
2018-08-10 12:26:48 +00:00
Gil Portenseigne bd389e0fd0 Improved : Remove all unnecessary boxing and unboxing in Java classes
(OFBIZ-10504)

Thanks Taher, Jacques, Mathieu and Rishi for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1837578 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:36:13 +00:00