Commit Graph
1143 Commits
Author SHA1 Message Date
Jacques Le Roux 78dd625bbe Improved: Display last-visited-time popup after login (OFBIZ-12148)
Makes afterlogin.lastvisit.show to false by default and document that in the
security documentation, ie in
https://cwiki.apache.org/confluence/display/OFBIZ/How+to+secure+your+deployment

Else when working in dev mode you always have to remove or wait the message to
remove itself

Fixes wrong wiki links in sy-password-and-JWT.adoc
2021-02-22 11:15:28 +01:00
Michael Brohl 69c62f5f00 Merge changes for PR #267 due to conflicting changes in trunk (OFBIZ-12169) 2021-02-15 17:15:18 +01:00
Jacques Le Roux 0ebb819247 Fixed: webapp position does not really work (OFBIZ-12176)
Fixes the tests:
Checks that when the same position is provided by the `WebappInfo` instance
only one is retrieved

Checks that when the same title with no position is provided by the `WebappInfo`
instance 2 instances are retrieved. though they use the same title only position
allows "collision"
2021-02-15 10:21:59 +01:00
Jacques Le Roux 568ac8927b Fixed: webapp position does not really work (OFBIZ-12176)
The current implementation of webapp position uses String as key.
You can't really order on String, you need numbers.

This is needed by OFBIZ-12166
2021-02-14 19:27:33 +01:00
Jacques Le Roux d60bf1574b Fixed: Remove _PREVIOUS_REQUEST_ Session Attribute on non-authentication pages (OFBIZ-12047)
After some small study, it seem there is a problem because login request not
require authentication

I have tried to add a test to check if current request is login and only if it's
not to remove PREVIOUS_REQUEST Session Attribute, it seem better with this
modification.

Thanks: Olivier for the patch and Michael for suggesting to parameterize using
a property. I simply used EntityUtilProperties.getPropertyValue instead of
UtilProperties.getPropertyValue
2021-02-13 12:29:02 +01:00
Michael Brohl 29bf0a040a Merge branch 'trunk' into OFBIZ-12169_Handle_remaining_checkstyle_errors 2021-02-13 11:26:01 +01:00
Wiebke Pätzold 74f224f88c Improved: Removed trailing spaces (OFBIZ-12169) 2021-02-09 14:16:08 +01:00
Jacques Le Roux e7b3169d03 Improved: Rename some connoted words like blacklist and whitelist (OFBIZ-12168)
Renames respectively blacklist and whitelist to denylist and allowlist in
several places.

There are still a lot of master word which can be replaced by main, but not in
contexts where slave is also used. I'll discuss that on dev ML again...

Provides the migrateOldOrderBlacklistAndOldOrderBlacklistType service to migrate
records from OrderBlacklist and OrderBlacklistType entities to new OrderDenylist
and OrderDenylistType entities
2021-02-09 09:55:39 +01:00
Wiebke Pätzold 95d37d2189 Removes and adds whitespaces as suggested by checkstyle (OFBIZ-12169) 2021-02-09 08:46:20 +01:00
Michael Brohl bae3628501 Declare classes final as suggested by checkstyle (OFBIZ-12169)
Helper and Worker classes which are likely to be extended by custom
projects where left as is.
2021-02-08 17:09:56 +01:00
James Yong ad0211ab2d Improved: Display last-visited-time popup after login (OFBIZ-12148) (#266)
Improved: Display last-visited-time popup after login (OFBIZ-12148)

To allow users to know of any unauthorised access to their accounts.

Thanks: Michael for review
2021-02-08 00:04:29 +08:00
Michael Brohl 0dc7e562c9 Improved: Remove unused imports (OFBIZ-12169) 2021-02-05 18:14:51 +01:00
Ingo Könemann ffcd8f34fc Fixed: Remove _PREVIOUS_REQUEST_ Session Attribute on non-authentication
pages (OFBIZ-12047)

Added removal of the _PREVIOUS_REQUEST_ attribute when requesting
non-authenticated sites and moved targetRequestUri handling to a
accommodate this change
2021-02-03 11:47:15 +01:00
Jacques Le Roux 2718ee011c Improved: fixes a typo 2021-01-30 11:01:37 +01:00
Daniel Watford edd7960e4b Fixed: Use data url scheme for logo in CompanyHeader
(OFBIZ-7327)

Use a data URL rather than a regular URL for company logos when a
logo has been specified as a Party Content item. This works around the
problem of Apache FOP failing to retrieve content from HTTPS URLs.

Thanks: Deepak Dixit for the review and suggestions
2021-01-24 16:26:34 +00:00
James Yong b679d36b49 Improved: Updated tasks.checkstyleMain.maxErrors to 278 2021-01-21 21:21:54 +08:00
James Yong 1bfd3c5fb0 Improved: Allow Unsafe Event Message (OFBIZ-12147)
Allow application to define event messages that contain javascripts, via request attribute "_UNSAFE_EVENT_MESSAGE_"

Thanks Jacques for review
2021-01-21 20:46:06 +08:00
James Yong 9c7dc7b877 Improved: Rename MultiBlockHtmlTemplateUtil to ScriptLinkHelper (OFBIZ-12134)
Rename + Refactor
2021-01-13 09:26:42 +08:00
Jacques Le Roux 333b896eef Fixed: Error wIth Flat Grey theme related to rest component (OFBIZ-12093)
When you use the Flat Grey theme (useful for RTL languages) you see an error in
the main menu (component choise). It's related to the rest component not using a
controller.

Fixes is simple and has not side effect: instead of throwing an exception simply
log a warning and return an empty string
2020-12-18 10:38:26 +01:00
James Yong bc5b0d595c Improved: Load language js for date.js only when required (OFBIZ-12064)
Tested on
1) date time field at /ordermgr/control/orderentry and
2) date find field at /ordermgr/control/findreturn
2020-11-27 21:51:35 +08:00
Jacques Le Roux ae5d3b4045 Fixed: NotSerializableException using uploadPartyContentFile service (OFBIZ-12050)
This error appears after trying to upload a file to party content:

2020-11-06 07:48:22,488 |jsse-nio-8443-exec-7 |RequestHandler                |I|
Sending redirect to:
[https://localhost:8443/partymgr/control/viewprofile?partyId=admin].
2020-11-06 07:48:29,288 |jsse-nio-8443-exec-7 |UtilObject                    |E|
null
java.io.NotSerializableException: org.apache.commons.fileupload.disk.DiskFileItem
2020-11-06 10:59:58 +01:00
James Yong aa8ae4b01e Improved: Move SeoConfigUtil.java from Product to Widget component (OFBIZ-12031)
Help to remove dependency of product component from widget component
An afterthought: webapp component seems better for SeoConfigUtil.java than widget component.

Thanks Jacques for review
2020-10-02 22:57:15 +08:00
Suraj Khurana acdddaf85c Improved: Corrected some spacing issues in code, where there are extra white spaces, this will fix some checkstyle issues in framework component.
(OFBIZ-12022)
2020-09-26 14:01:43 +05:30
Jacques Le Roux f1b88bd84b Improved: Checkstyle: Variable name must match pattern (OFBIZ-11926)
Better use Debug.logVerbose in place where I replaced missing expression with
another varation of Debug.log. We mainly don't need these information, it's only
for Checkstyle.

I thought did not replace cases where using another variation makes sense
2020-09-21 10:45:03 +02:00
Jacques Le Roux 346c63bfdf Improved: Checkstyle: Variable name must match pattern (OFBIZ-11926)
We have a lot of "do nothing" in Java code. In case of catch we should at least
have Debug.logError(e, MODULE); and maybe an explanation in the comment.
2020-09-15 15:24:45 +02:00
Suraj Khurana a5619831eb Improved: Added missing Javadocs for remaining methods in framework component, this is required for all classes which looks like designed for extension (can be subclassed).
(OFBIZ-11947)
Thanks Jacques for review.
2020-09-13 11:28:00 +05:30
Suraj Khurana 97b1688b0d Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in framework component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements. Thanks Jacques for review.
2020-09-12 12:05:16 +05:30
Suraj Khurana bc5e945ded Improved: Corrected line is longer than 150 characters checkstyle issues in framework component.
(OFBIZ-11921)
Also fixed some other extra space and naming related checkstyle issues observed.
Thanks Jacques for review.
2020-09-04 12:25:12 +05:30
James Yong 4a03567996 Improved: Allow logging to be disabled for getJs request (OFBIZ-11980)
Hide non-error logs related to getJs request as it doesn't provide meaningful data.

Thanks Jacques for initial review
2020-08-30 21:34:34 +08:00
Akash Jain 66a76ffd5a Improved: Fix Literals comparisons with variable to avoid NPE (OFBIZ-11929)
Thanks, Devanshu Vyas for your contribution.
2020-08-30 17:20:23 +05:30
Suraj Khurana f98f5ebb86 Improved: Added missing Javadocs for some methods, this is required for all classes which looks like designed for extension (can be subclassed).
(OFBIZ-11947)
Also fixed some other checkstyle issues that requires re-factoring.
Thanks Jacques for review.
2020-08-28 16:54:15 +05:30
Jacques Le Roux b42cd5f188 Improved: removes unused MODULE var in FreeMarkerViewHandler.java
Also removes empty line in build.gradle
2020-08-28 09:00:36 +02:00
Jacques Le Roux 8276a0802b Improved: Freemarker macro for JsLanguageFilesMapping (OFBIZ-11958)
Adds a missing ASL2 header
2020-08-27 19:34:35 +02:00
Suraj Khurana f357b997c0 Improved: Corrected class names, method names, data members of class and variables names in framework component.
(OFBIZ-11926)
Also corrected some formatting and line length related checkstyle issues.
2020-08-26 21:40:40 +05:30
Pawan Verma 6cb67c1a40 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:17:10 +05:30
Suraj Khurana 9689201b84 Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in framework component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements.
Thanks jacques for finalizing Javadoc pattern during this effort.
2020-08-22 13:20:39 +05:30
Suraj Khurana 8c10d4ae72 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 framework component. Also corrected some variables as per naming convention best practices.
Thanks Jacques for review.
2020-08-17 12:30:26 +05:30
James Yong 8b2524d4ad Fixed: Freemarker macro for JsLanguageFilesMapping (OFBIZ-11958)
Fix missing type arguments for generic class Map<K,V>
2020-08-15 20:35:46 +08:00
James Yong 49e365d9a2 Improved: Freemarker macro for JsLanguageFilesMapping (OFBIZ-11958)
A macro is needed to get info from JsLanguageFilesMapping class.
<@jsLangFilesMap>select2</@jsLangFilesMap>
2020-08-15 18:42:52 +08:00
Jacques Le Roux b895a9c889 Improved: Removed unused imports from Java files for fixing checkstyle errors (OFBIZ-11930)
Fixes few javadoc issues

Since this has been ignored for few commits I need to increase
tasks.checkstyleMain.maxErrors from 12224 to 12247 (did not check the detail)
2020-08-08 14:04:08 +02:00
Priya Sharma 5dbf5cb9eb Improved: Removed unused imports from Java files for fixinf checkstyle errors
(OFBIZ-11930)
Thanks: Priya Sharma
2020-08-07 18:57:02 +05:30
Suraj Khurana 7d82b17c72 Improved: Corrected some line is longer than 150 characters checkstyle issues in framework component. Also fixed some extra spaces and naming conventions related checkstyle issues.
(OFBIZ-11921)
2020-08-03 10:11:40 +05:30
Jacques Le Roux be498295a5 Improved: Update build.gradle to the latest dependencies (OFBIZ-11603)
Fixes some new warnings coming from JUnit 4.13, a step ahead to JUnit 5.

I left 2 complicated ExpectedException  warnings. Change will be needed for JUnit 5.
https://www.luxoft-training.com/news/migrating-from-junit-4-to-junit-5-replacing-rules-with-the-extension-model-part-1/
2020-07-27 16:14:51 +02:00
Suraj Khurana d374019465 Improved: Corrected all incorrect indentation level issues in framework component, also fixed some case indentation checkstyle issues.
(OFBIZ-11922)
2020-07-26 21:04:41 +05:30
Suraj Khurana f4f2722d36 Improved: Updated case indentation to 0 for all switch statements in framework component. Also done formatting changes as per checkstyle best practices.
(OFBIZ-11904)
2020-07-25 13:50:37 +05:30
Suraj Khurana 7b251e43d9 Improved: Corrected some single line statements to fix checkstyle issues, also removed some remaining extra spaces from code to avoid checkstyle erros in framework component.
(OFBIZ-11886)
2020-07-21 12:25:20 +05:30
Jacques Le Roux 80e545c0f8 Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
We no longer have "/error/error.jsp" file,
so always use "common/webcommon/error/Error.ftl" by default
2020-07-18 11:14:58 +02:00
Suraj Khurana 8b1e0dbd85 Improved: Corrected all checkstyle formatting issues: 'typecast' is not followed by whitespace in framework component.
(OFBIZ-11887)
2020-07-18 12:26:42 +05:30
Suraj Khurana 0c37e80036 Improved: Corrected all checkstyle formatting issues: Line has trailing spaces in framework component.
(OFBIZ-11880)
Thanks Jacques for review.
2020-07-13 14:18:24 +05:30
Suraj Khurana dd4da77d76 Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for framework 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:33:47 +05:30