Clone Tools
  • last updated 20 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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>

  1. … 35 more files in changeset.
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

  1. … 4 more files in changeset.
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

Conflicts handled by hand

applications/party/template/party/profileblocks/Content.ftl

framework/common/groovyScripts/CommonServices.groovy

    • -0
    • +36
    ./CommonServices.groovy
  1. … 1 more file in changeset.
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

  1. … 1 more file in changeset.
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...

Improved: Convert CommonServices.xml from mini lang to groovy (OFBIZ-11402)

Thanks to Wiebke Pätzold for providing the patch

  1. … 2 more files in changeset.
Improved: Convert CommonServices.xml from mini lang to groovy (OFBIZ-11402)

Thanks to Wiebke Pätzold for providing the patch

  1. … 2 more files in changeset.
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.

  1. … 1 more file in changeset.
Convert Thesaurus services in CommonServices.xml from mini lang to groovy. (OFBIZ-11357)

Thanks Wiebke Pätzold for reporting and providing the patch.

    • -0
    • +62
    ./CommonServices.groovy
  1. … 2 more files in changeset.
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 1941a05a349865b8505ec373de3fce3b3a96c2a0.

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.

  1. … 8 more files in changeset.
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

  1. … 1 more file in changeset.
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

(cherry picked from commit 350c71f4df45cbe5671b54e61f74f9a352d78e05)

# Conflicts:

# framework/common/groovyScripts/SetLocaleFromBrowser.groovy

# themes/common-theme/webapp/common/js/util/setUserTimeZone.js replaced

by setUserLocale.js modified by hand

I can compile locally but I can see a reason why and certainly not related to

these changes

  1. … 1 more file in changeset.
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

  1. … 1 more file in changeset.
Improved: Clean some Groovy files in base component (OFBIZ-10646)

Following discussion at https://markmail.org/message/y3izmnxd7jd6jbkf

this cleans some Groovy files in the base component, notably:

* remove ant-scripts folder and its content.

* Rename framework/base/groovyScript to framework/base/groovyScripts;

* Move GroovyInit.groovy and GroovyServiceTest.groovy respectively to

framework/base/groovyScripts and framework/common/groovyScripts

and change their paths where used.

* Removes GroovyInit.groovy from excludedConfigFiles in build.gradle

* After OFBIZ-10611 it's possible to move GroovyBaseScript.groovy from

framework/service/src/main/java/org/apache/ofbiz/service/engine

to

framework/service/src/main/groovy/org/apache/ofbiz/service/engine

* Removes FileUtilTests.groovy from basetests.xml (missed it in OFBIZ-10611)

* Fixes a typo in test-suite.xsd

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846485 13f79535-47bb-0310-9956-ffa450edef68

    • -0
    • +69
    ./GroovyServiceTest.groovy
  1. … 13 more files in changeset.
Improved: Rename the misnamed setUserLocale.js to setUserTimeZone.js (OFBIZ-10472)

At the same time renames setLocaleFromBrowser to SetTimeZoneFromBrowser

everywhere it's needed

And adds a documentation about the auth mismatch as suggested by Mathieu

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835628 13f79535-47bb-0310-9956-ffa450edef68

    • -0
    • +32
    ./SetTimeZoneFromBrowser.groovy
  1. … 5 more files in changeset.
Improved: GetLocaleList call can provide duplicate results (OFBIZ-10458)

Just improve hasFilter condition to use .with groovy notation.

Thanks Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835599 13f79535-47bb-0310-9956-ffa450edef68

Fixed: GetLocaleList call can provide duplicate results (OFBIZ-10458)

A new Junit test is implemented to validate that no duplicates are present.

Groovy service has been refactored to use a more functional style

Thanks Mathieu Lirzin for reporting and providing the patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1835283 13f79535-47bb-0310-9956-ffa450edef68

  1. … 1 more file in changeset.
Fixed: GetLocaleList call can provide duplicate results (OFBIZ-10458)

A new Junit test is implemented to validate that no duplicates are present.

Groovy service has been refactored to use a more functional style

Thanks Mathieu Lirzin for reporting and providing the patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835282 13f79535-47bb-0310-9956-ffa450edef68

  1. … 1 more file in changeset.
Implemented: Add CustomScreen entity copy from CustomMethod pattern (OFBIZ-10186) With this entity we can define some different widget screens available on the system (organised by type) to link with other entities for resolve a specific screen to use for a specific context (future actual case to implement, select a invoice pdf screen linked to a party) without framework modification

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824274 13f79535-47bb-0310-9956-ffa450edef68

    • -0
    • +32
    ./ChildrenCustomScreenTypes.groovy
  1. … 2 more files in changeset.
Improved: Convert CommonPermissionServices.xml mini lang to groovy (OFBIZ-9993) convert services genericBasePermissionCheck, commonGetAllCrudPermissions and visualThemePermissionCheck from minilang to groovy. The simple method genericBasePermissionCheck is maintain but indicate as deprecated in log to don't break direct call from other mini-lang script.

Thanks to Dennis Balkir for this patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823397 13f79535-47bb-0310-9956-ffa450edef68

    • -0
    • +115
    ./permission/CommonPermissionServices.groovy
  1. … 2 more files in changeset.
"Applied fix from trunk for revision: 1823324 " ------------------------------------------------------------------------ r1823324 | jleroux | 2018-02-06 14:17:57 +0100 (mar., 06 févr. 2018) | 26 lines

Fixed: Security issue in Token Based Authentication

(OFBIZ-10206)

The version I committed so far in OFBIZ-9833 has a small security issue.

See the Jira description for all details

To test I have attached a OFBIZ-10206-external-server-test-example.patch to

the Jira

This removes the external-server-query property now useless

In ContextFilter the getHeader (wrapper) now uses an autoLoginCookie to get

the userLoginId passed in the JWT instead of externalServerUserLogin parameter.

A sourceServerWebappName parameter must be passed from the client request to

allow reading the autoLoginCookie.

This userLoginId is then retrieved on the target server from the JWT in the

externalServerLoginCheck which is simplified.

In LoginWorker

getAutoLoginCookieName() has now 2 versions to allow to pass a webappname

A new autoLogoutFromAllBackendSessions() method has been added but for now

commented out. Decommenting it out will be submitted as a patch in OFBIZ-4959.

Thanks: Leila Mekika for reporting the security issue directly to me

------------------------------------------------------------------------

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1823325 13f79535-47bb-0310-9956-ffa450edef68

  1. … 4 more files in changeset.
Fixed: Security issue in Token Based Authentication (OFBIZ-10206)

The version I committed so far in OFBIZ-9833 has a small security issue.

See the Jira description for all details

To test I have attached a OFBIZ-10206-external-server-test-example.patch to

the Jira

This removes the external-server-query property now useless

In ContextFilter the getHeader (wrapper) now uses an autoLoginCookie to get

the userLoginId passed in the JWT instead of externalServerUserLogin parameter.

A sourceServerWebappName parameter must be passed from the client request to

allow reading the autoLoginCookie.

This userLoginId is then retrieved on the target server from the JWT in the

externalServerLoginCheck which is simplified.

In LoginWorker

getAutoLoginCookieName() has now 2 versions to allow to pass a webappname

A new autoLogoutFromAllBackendSessions() method has been added but for now

commented out. Decommenting it out will be submitted as a patch in OFBIZ-4959.

Thanks: Leila Mekika for reporting the security issue directly to me

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823324 13f79535-47bb-0310-9956-ffa450edef68

  1. … 4 more files in changeset.
Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029) Applied slightly modified patch, rearrange import properly, Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818003 13f79535-47bb-0310-9956-ffa450edef68

  1. … 43 more files in changeset.
Reverted r#1817989, workign fine locally, reverted for now will check and commit again

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817998 13f79535-47bb-0310-9956-ffa450edef68

  1. … 43 more files in changeset.
Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029) Applied slightly modified patch, rearrange import properly, Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817989 13f79535-47bb-0310-9956-ffa450edef68

  1. … 43 more files in changeset.
Implemented: Token Based Authentication (OFBIZ-9833)

This works the same way than externalLoginKey but between 2 servers,

not 2 webapps on the same server.

The Single Sign On (SSO) is ensured by a JWT token, then all is handled as

normal by a session on the reached server. The servers may or may not share a

database but the loginUserIds on the 2 servers must be the same.

OOTB the JWT masterSecretKey is not properly initialised and can not be OOTB.

As we sign on on several servers, so have different sessions, we can't use the

externalLoginKey way to create the JWT masterSecretKey.

The best way to create the JWT masterSecretKey is to use a temporary way to load

in a static final key when compiling. This is simple and most secure.

One of the proposed way is to use sed and uuidgen to modify the masterSecretKey

value. The magic words here are TEMPORARY and FINAL!

I have not tested this between 2 servers yet, only locally where it works well.

I'll do after this commit between my local instance and the trunk demo.

Thanks: Nicolas for the sed ans uuidgen suggestion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813679 13f79535-47bb-0310-9956-ffa450edef68

    • -0
    • +19
    ./ExternalServerName.groovy
  1. … 3 more files in changeset.
No functional change, fixes wrong ASL2 headers I introduced recently

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812235 13f79535-47bb-0310-9956-ffa450edef68

  1. … 2 more files in changeset.
No functional change, these files were missing the ASL2 header

I stop here, please help at https://ci.apache.org/projects/ofbiz/rat-output.html

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812225 13f79535-47bb-0310-9956-ffa450edef68

  1. … 4 more files in changeset.
Fixed: InitTheme.groovy can't work without request (OFBIZ-9798) When a sendOrderConfirmation runs it calls InitTheme.groovy. But then there is no request and InitTheme fails The script was improved to escape if the request is empty and try before to resolve the visualThemeId from the context Tanks Jacques for the catch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811042 13f79535-47bb-0310-9956-ffa450edef68

Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme) Five step #9 Change all set screen and script that call widget.properties values replaced by call to modelTheme

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806150 13f79535-47bb-0310-9956-ffa450edef68

  1. … 57 more files in changeset.