Commit Graph
2222 Commits
Author SHA1 Message Date
Jacques Le Roux 33ca531db4 Improved: correct formatting of LoginServices
This was a WIP related to "Allow single line statements in checkstyle"
(OFBIZ-11886) but not really part of it.
See OFBIZ-11886-format-LoginServices-checkNewPassword.patch.

It may also include changes from
"Checkstyle formatting issues: 'typecast' is not followed by whitespace"
(OFBIZ-11887)
2020-07-14 14:09:45 +02:00
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
Suraj Khurana 3bb22302c7 Improved: Corrected all checkstyle issues related to succeeding space for comma in framework directory.
(OFBIZ-11805)
Thanks Jacques and Ritesh Kumar for review.
2020-07-09 12:07:29 +05:30
Suraj Khurana c5f9697e35 Improved: Removed unused SuppressWarnings and added proper space after comma and before { in LoginServices.java.
(OFBIZ-11805)
Thanks: Pawan Verma
Also updated tasks.checkstyleMain.maxErrors (-5).
2020-07-07 17:10:11 +05:30
Suraj Khurana 443025e37f Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-framework into trunk 2020-07-07 15:10:53 +05:30
Suraj Khurana fc6b8a6ca3 Improved: Corrected remaining ', is not followed by whitespace' checkstyle errors in framework component.
(OFBIZ-11805)
2020-07-07 15:08:17 +05:30
Jacques Le Roux c52e437eca Improved: Removes trailing blanks found by chance, updates checkstyleMain.maxErrors 2020-07-07 10:12:25 +02:00
Jacques Le Roux 05b62d7476 Improved: moves a comment to its right location 2020-07-06 16:10:57 +02:00
Suraj Khurana 4f53828bea Improved: Corrected all 'if is not followed by whitespace' checkstyle errors. Also corrected few ', is not followed by whitespace' checkstyle errors in framework component.
(OFBIZ-11805)
Thanks Jacques Le Roux and Ritesh Kumar for review.
2020-07-06 15:29:58 +05:30
Pawan Verma 3da16a182c Improved: Replace Collection.sort() with List.sort().(OFBIZ-11830) 2020-06-28 01:21:23 +05:30
Pawan Verma e19b12eae9 Improved: Replace explicit type argument with diamond operator(OFBIZ-11828)
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.
2020-06-28 01:04:51 +05:30
Pawan Verma 4275825b4a Improved: Replace anonymous types with lambda expressions(OFBIZ-11833) 2020-06-24 14:11:05 +05:30
Pawan Verma 43747764bc Improved: Change resources with proper naming convention in framework(OFBIZ-11834)
Also, modified checkstyleMain.maxErrors to 26735(-24)

Thanks: Jacques and Suraj for review.
2020-06-18 15:30:00 +05:30
holivier da690493f9 Fixed: Check embedded Javascript libs vulnerabilities using retire.js
(OFBIZ-11752)

Upgraded jQuery to 3.5.2 and jQuery migrate to 3.3.0 to vulnerabilities
of medium severity
    Regex in its jQuery.htmlPrefilter sometimes may introduce XSS;
https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/

change in HelpScreen.xml
2020-06-17 14:34:51 +02:00
James Yong 4e563a67ff Fixed: showHelp not working (OFBIZ-11803)
Fixed Navigation tree is not displayed in showHelp page.
2020-06-06 19:49:26 +08:00
Priya SharmaandPriya Sharma 15aec7e8f7 WIP: [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug (OFBIZ-11762) (#185)
* [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug
- Replaced the debug.log methods with the respective groovy utility method
- Enhanced the GroovyBaseScript to entertain the fetch the current class name as the module name for logging
- Overloaded the logError method to entertain throwbale object for better logging
- Removed unused import statements and module variables.

(OFBIZ-11762)

* [Removed]: Extra line spaces. (OFBIZ-11762)

* [Revert]: Unwanted changes. (OFBIZ-11762)

* [Added] Same changes to these files. (OFBIZ-11762)

Co-authored-by: Priya Sharma <priya.sharma@example.com>
2020-06-06 10:17:23 +02:00
holivier 211540a966 Documented: Help link using asciidoc files via generated html
(OFBIZ-11693)

Migrate AccountingHelData.xml to added some <set field="helpAnchor" to
the correct screens

Now in accounting component only asciidoc documents are used, help link
area now link to userDocUri
(ci.apache.org/projects/ofbiz/site/trunk/ofbizdoc as default value in
general.property)
2020-06-05 15:15:21 +02:00
holivier d79d7c50b8 Improvement: Help link using asciidoc files via generated html (OFBIZ-11693)
1. Add a general property: userDocUri containing uri for
ofbiz.apache.org html user-documentation generated by Buildbot
2. in each theme, add a test on helpAnchor field, if it's define help
link is now on ${userDocUri}#${helpAnchor}
  * if userDocUri is not defined, the general property is used
2020-06-04 17:42:23 +02:00
James Yong c0e527efb2 Improved: Headerize external script in multi-block html template (OFBIZ-11741)
Allow external scripts within the multi-block html template, to be rendered
within the html head tag, when a new attribute data-import is set to “head”

Thanks: Jacques for review
2020-05-30 12:00:21 +08:00
Suraj Khurana abc7836dde Improved: Made MODULE as private data member of class instead of public in all framework components.
(OFBIZ-11739)
This will reduce checkstlye issues. Thanks Jacques for review.
2020-05-29 13:20:46 +05:30
Pierre Smits 5fac98022e Improved: quote menu
(OFBIZ-11715)

updated: QuoteTabBar - simplified labels
updated: moved 'Edit quote' menu item to QuoteSubTabBar
updated: reordering of menu-items of QuoteTabBar
updated: various UiLabels used by menu-items in QuoteTabBar
2020-05-24 14:34:03 +02:00
Jacques Le Roux ccabbd8e4e Fixed: Have a service that runs periodically to generate CustomTimePeriod records
(OFBIZ-10905)

Fixes the loading sequence of CommonScheduledServicesDemoData.xml now
ScheduledServicesDemoData.xml in service component
2020-05-16 13:25:17 +02:00
Pierre Smits 50857f1505 Implemented: Have a service to periodically create PeriodRecords (OFBIZ-10905) (#133)
* Implemented: Have a service that runs periodically to create CustomTimePeriod records

(OFBIZ-10905)

added: service createFuturePeriod
added: function createFuturePeriod called by createFuturePeriod
added: SystemProperty records called by createFuturePeriod function
added: JobSandbox record to schedule createFuturePeriod service
added: ref to CommonScheduledServicesDemoData.xml in component.xml

* Implemented: Have a service that runs periodically to create CustomTimePeriod records

(OFBIZ-10905)

improved: description

* Implemented: Have a service that runs periodically to create CustomTimePeriod records

(OFBIZ-10905)

improved: groovy code aligning to code formats
2020-05-16 11:03:13 +02:00
James Yong 803f7fa060 Improved: <script-template> widget tag (OFBIZ-11686)
The new tag allows us to render a freemarker template containing javascript,
as external script in html instead of inline script.
This helps to reduce CSP errors.
2020-05-13 20:19:05 +08:00
Suraj Khurana ba04eda31a Improved: Converted CustomTimePeriod related services from simple to entity-auto
(OFBIZ-11689)
Thanks Pierre for reporting.
2020-05-13 10:25:15 +02:00
Pierre Smits eea0198835 Improved: Currency Data for China
(OFBIZ-11629)

improved description
2020-05-04 17:33:52 +02:00
Jacques Le Roux 1efaa73ebb Fixed: PartyProfileContent.js does not work
(OFBIZ-11633)
When you upload a content from the party profile page you don't see a progress
bar. The PartyProfileContent.js is loaded but for some reason is unused or wrong

Mohammad Kathawala mentionned that it was removed with OFBIZ-9299
It was also broken with OFBIZ-11402

Thanks: Mohammad for the track
2020-05-02 09:31:54 +02:00
Pawan Verma ffe9c46cf0 Improved: Used utility provided by OFBizTestCase class for userLogin instead of fetching from DB test cases also removed unused fetching of userLogin in some cases
(OFBIZ-11618)
2020-04-30 22:00:04 +05:30
Jacques Le Roux 5428a73399 Improved: Increase the size of http.upload.max.sizethreshold
(OFBIZ-11598)

The http.upload.max.sizethreshold size is curently sets to 10240 (10KB) and that
seems small nowadays to me. We could use 1MB.

Also moves mail.spam.name in its mail block

Thanks: Pawan for review
2020-04-26 10:13:09 +02:00
Jacques Le Roux 98f6d7ea8d Improved: Internal SSO: adds more time to compensate for possible time difference 2020-04-15 15:08:43 +02:00
Jacques Le Roux e0c8a1f4b0 Fixed: 'FindJob' generates an error
(OFBIZ-11590)

This is due to OFBIZ-11402. Handling a converter for java.time.ZoneRegion is
complicated. Adding a toString() is enough.

Also 2 automated formatting while at it...
2020-04-14 13:42:11 +02:00
Jacques Le Roux e1988a29c8 Improved: moves "10 seconds" comments from security.properties to CommonEvents.java
Also removes trailing blanks in security.properties
2020-04-13 11:40:58 +02:00
Jacques Le Roux b95fa36bf4 Improved: follow checkstyle conventions in files committed for CSRF token defense
Mostly manually-automated, so some changes are not perfect. I have manually
changed back excessive ones

Comments out ArrayTypeStyle checkstyle
Updates checkstyleMain.maxErrors
2020-04-06 12:05:16 +02:00
Jacques Le Roux ddb8f4273a Improved: replaces module by MODULE everywhere 2020-04-05 19:46:34 +02:00
Jacques Le Roux 6c49411ee7 Improved: "auth" should be true for all the request url used for Application
components

(OFBIZ-4956)

Currently there are some URLs present in application components with
auth="false". So anyone can hit these URLs and access these resources without
authorization.
I think all the URLs should be secure with auth="true"

jleroux: I have also fixed the dataResourceId="GZ-DIG"

Thanks: Amardeep Singh Jhajj for report and initial fix
2020-04-04 15:25:51 +02:00
Jacques Le Roux 019b58859e Improved: POC for CSRF Token
(OFBIZ-11306)

There is no need to change it there because, apart the ecommerce application,
there are no applications that requires an anonymous flow.
It should be only changed in ecommerce controller.
2020-03-27 14:42:40 +01:00
Jacques Le Roux ef8546bf19 Improved: POC for CSRF Token
(OFBIZ-11306)

There is no need to change it there because, apart the ecommerce application,
there are no applications that requires an anonymous flow.
It should be only changed in ecommerce controller.
2020-03-23 15:30:40 +01:00
Michael Brohl 89333dfdd8 Fixed: Fixed a bug introduced with the removal of the login security
question.

(OFBIZ-11244)

Thanks Olivier Heintz for reporting and Wiebke Pätzold for providing the
patch.
2020-03-21 11:31:54 +01:00
Michael Brohl d3907529c3 Implemented: Remove the user login security question.
(OFBIZ-11244)

Thanks Wiebke Pätzold for providing the patch.
2020-03-21 11:31:47 +01:00
Nicolas Malin 7f10602654 Improved: Convert CommonServices.xml from mini lang to groovy
(OFBIZ-11402)

Thanks to Wiebke Pätzold for providing the patch
2020-03-21 11:31:47 +01:00
Jacques Le Roux c34491892a Improved:
Implemented:
Documented:
Completed:
Reverted:
Fixed:
Improved: no functional change
(OFBIZ-)
Explanation
Thanks:
2020-02-27 14:36:26 +01:00
Michael Brohl 59f05e6df1 Improved: Move permission checks to service definitions via permission
service.

(OFBIZ-11357)

Thanks Pawan Verma for the suggestion and Wiebke Pätzold for providing
the patch.
2020-02-25 12:05:34 +01:00
Michael Brohl 30566a6bde Convert Thesaurus services in CommonServices.xml from mini lang to
groovy.
(OFBIZ-11357)

Thanks Wiebke Pätzold for reporting and providing the patch.
2020-02-22 10:29:35 +01:00
Deepak Dixit 0e007d80c2 Added missing GeoAssoc data for Ladakh geo
(OFBIZ-11399)
2020-02-22 13:03:01 +05:30
Deepak Dixit 4f25633992 Update India Geo information according to ISO notifications 2019-11-22
(OFBIZ-11399)

Change of subdivision category from state to Union territory for IN-JK; Addition of Union territory IN-LA;
2020-02-22 12:52:45 +05:30
Suraj Khurana 24fb560ecf Fixed: UserLoginPasswordHistory is not maintaining password as present in UserLogin.
(OFBIZ-10802)
Thanks Rohit Koushal for the patch. Thanks Jacques Le Roux and Gil Portenseigne for the review.
2020-02-22 12:41:36 +05:30
Nicolas Malin 38f972a0d0 Improved: Add CommonForms as template pattern configured by theme
(OFBIZ-11335)

Currently on OFBiz we implemented a process to define some different
screen and menu that can be implemented by the theming.
But for the form we have nothing. All style are hard coded on each

    <grid name="ListEntities" ...
      odd-row-style="alternate-row" default-table-style="basic-table hover-bar">

I extend the theming implementation principle to forms element with adding :
 * a new xsd element common-forms (like common-screens)
 * some default form templates to extend :
   * grid CommonSimpleGrid
   * grid CommonBasicGrid
   * form CommonSimpleList
   * form CommonBasicList
   * form CommonInLineEditList
   * form CommonBasicSingle

We can use its like :

    <form name="LayoutDemoList" extends="CommonBasicList"
          extends-resource="component://common/widget/CommonForms.xml"

The main difficulty raise to this task was propage the visualTheme during
the ModelForm intanciation, because we need to load wiget style
(and some other information wanted on the template) on model load in memory.
This is cover by commit 1941a05a34.

Forms present on the screen https://localhost:8443/webtools/control/WebtoolsLayoutDemo
are now extend through with theme.

Finally with this we can extend style form (pagination, header, line and so on ...)
directly by your theme without change the framework.
2020-02-20 14:49:11 +01:00
Jacques Le Roux 350c71f4df Fixed: setUserTimeZone should ran only once based on error
(OFBIZ-11329)

This will be notably useful when committing CSRF solution as explained in
OFBIZ-11306:

SetTimeZoneFromBrowser when starting gives a  RequestHandlerException:
Invalid or missing CSRF token for AJAX call to path '/SetTimeZoneFromBrowser'.
Also not only when starting.

Thanks: James Yong for review
2020-02-05 09:30:55 +01:00
Jacques Le Roux d5f19e3560 Fixed: impersonateLogin
(OFBIZ-5409)

I reopended this old issue because, while working on  OFBIZ-11329, I found that
userLogin and impersonateLogin should be removed from
jsonResponseFromRequestAttributes

Thanks: James Yong for pointing that out
2020-02-04 15:35:40 +01:00