Commit Graph
111 Commits
Author SHA1 Message Date
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
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
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 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 8ca14ec910 Fixed: BigDecimal casting in Groovy (OFBIZ-11862)
Sometimes use wrong type castings for BigDecimal:

I have observed that for typecasting in groovy, we have used the wrong coding
pattern like

(BigDecimal) 0
It should be like
0 as BigDecimal

Note that this does not apply to decimal because in case of decimal, the default
type is always BigDecimal in Groovy.

Thanks: Pritam Kute for spotting the issue in OFBIZ-11843
2020-06-30 15:31:27 +02:00
d931dfb9c9 Improved: Use GroovyBaseScript's makeValue utility methods in each Groovy files (OFBIZ-11779) (#33)
* Improved: Use GroovyBaseScript's makeValue utility methods in each Groovy files(OFBIZ-11779)

* Improved: Removed extra bracket added accidentally. (OFBIZ-11779)

* Update bi/groovyScripts/DimensionServices.groovy

Co-authored-by: Nicolas Malin <nmalin@apache.org>

Co-authored-by: Priya Sharma <priya.sharma@hotwaxsystems.com>
Co-authored-by: Nicolas Malin <nmalin@apache.org>
2020-06-28 01:24:52 +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
Jacques Le Roux 208ef1b1be Improved: replaces module by MODULE everywhere 2020-04-06 12:14:23 +02:00
Jacques Le Roux 492dcb9208 Improved: fixes a typo due to OFBIZ-11030
Thanks: Pierre Smits for spotting it
2020-03-26 16:11:09 +01:00
Jacques Le Roux a8d3781cc6 Fixed: Convert DimensionServices.xml minilang to groovy
(OFBIZ-10948)

Now correctly creates the CurrencyDimension using currency.uomId
No need for delegator.setNextSeqId(), looking at (now removed)
DimensionServices.xml confused me.

Thanks: Pierre Smits for report
2020-03-21 19:36:39 +01:00
Pawan Verma 38112fb346 Fixed: prepareProductDimensionData does not load correct fields in ProductDimension
(OFBIZ-11465)

Thanks: Pierre Smits for your contribution.
2020-03-21 17:23:05 +05:30
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
Jacques Le Roux 350571deaa Fixed: Convert DimensionServices.xml minilang to groovy
(OFBIZ-10948)

There is a bug with loadCurrencyDimension in DimensionServices.groovy
It shows when running quickInitDataWarehouse.

The problem is this Minilang expression is missing in DimensionServices.groovy:
<sequenced-id sequence-name="CurrencyDimension" field="currencyDim.dimensionId"/>

Adding
  delegator.setNextSeqId(currencyDim)
is enough.
2020-03-17 08:49:05 +01:00
Michael Brohl b50d949376 Improved: Convert FactServices.xml minilang to groovy.
(OFBIZ-11030)

Thanks Pierre Smits for reporting and Sebastian Berg for providing the
patch.
2020-03-13 17:44:51 +01:00
Priya Sharma d5d0623e55 Update: The entity operator as the XML service used these instead of the current ones.
- Thanks Jacques for the catch. (OFBIZ-19048)
2020-03-09 20:45:11 +05:30
Priya Sharma fd902848e8 [Improved] : Converted the Dimension Service to groovy
- Deleted the old mini-lang service file
- Updated the service definitions with the new groovy methods
- Added a new file with the groovy implementation (with minor enhancement) of all the Dimension services
As the services deal with lists, there could be scenarios where the enterprise comprises of several thousand products, and so used the EntityListIterator instead of fetching the entire list.
2020-03-06 17:31:04 +05:30
Nicolas Malin 04b2c4c28a Fixed: Error when initialize billFromParty from groovy context in loadSalesOrderItemFact service
After the conversion from bsh to groovy, the script that resolve
billFromParty need to propage the value on context Map to be available
on minilang context
2020-02-06 13:03:18 +01:00
Pawan Verma 90e5f7deff Fixed: service 'loadSalesOrderItemFact' has hard coded currencyUomId
(OFBIZ-11033)

Used PartyAccountingPreference.baseCurrencyUomId instead of hard coded USD.

Thanks: Pierre Smits for your contribution.
2020-01-30 18:55:01 +05:30
Pawan Verma ccb6219954 Implemented: Have a Country Dimension
(OFBIZ-10954)

Added new CountryDimension entity in olap.

Thanks: Pierre Smits for your contribution.
2020-01-30 14:45:25 +05:30
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
Mathieu Lirzin 6e211a7c2a Improved: Use ‘UtilGenerics#checkCollection’ when possible
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863488 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:17:32 +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
Michael Brohl 31d9364ac4 Improved: Fixing defects reported by code analysis tools, package
org.apache.ofbiz -bi.util, -birt and -birt.container.
(OFBIZ-10102)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1818845 13f79535-47bb-0310-9956-ffa450edef68
2017-12-20 19:45:02 +00:00
Deepak Dixit f1557bef30 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-plugins/trunk@1817986 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 09:02:59 +00:00
Deepak Dixit e82e469e24 Improved: Manage life span of SecurityGroupPermission entity.
Applied patch from jira issue(OFBIZ-9801) Thanks Suraj Khurana for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1812384 13f79535-47bb-0310-9956-ffa450edef68
2017-10-17 10:48:43 +00:00
Jacques Le Roux 646e2e9d47 Improved: Add session tracking mode and make cookie secure
(OFBIZ-6655)

Programmatically replaces the web.xml <session-config> declarations and uses 
the @WebListener annotation to start the process. This avoid to duplicates 
things everywhere in web.xml files. Since the web.xml files have precedence 
on annotations, the setting can be easily overridden when necessary.

Now that we also use HTTPS in ecommerce the ecommerce session cookie is 
also secured.

I also noted that we had 8 weird <session-timeout> declarations:
    in solr component: <session-timeout>2</session-timeout>
    in themes: <session-timeout>1</session-timeout>

Also in Rainbowstone we lacked the <cookie-config> and <tracking-mode> 
declarations. I think it's not good.

I resolve these points by simply removing the <session-config> in web.xml files 
of themes and Solr.

Thanks: Pradhan Yash Sharma  for review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1811041 13f79535-47bb-0310-9956-ffa450edef68
2017-10-04 07:12:57 +00:00
Deepak Dixit 9f4cb137ef Improved:Use from-field pattern instead of value=dollor pattern in 'set' element
Apply slightly modified patch from jira issue, fixed some typo (OFBIZ-9607)
Thanks Suraj Khurana and Rohit Rai for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1806327 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 20:24:09 +00:00
Nicolas Malin 18d3a7e982 Fixed: Consistency and Readability improvements for make-value tag (OFBIZ-8986)
Consistency on the attribute order for make-value element as : entity-name, value-field
Thanks to Ankush Upadhyay and Devanshu Vyas for the issue and the corrective patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1805957 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 20:45:25 +00:00
Deepak Dixit d02d1d3030 Improved: Replace fields with id-ne, id-long-ne and id-vlong-ne by id, id-long and id-vlong respectively which are not primary keys (OFBIZ-9355)
Thanks Aditya Sharma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1804027 13f79535-47bb-0310-9956-ffa450edef68
2017-08-03 17:54:36 +00:00
Deepak Dixit c1f0182890 Improved: Replace fields with "id-ne", "id-long-ne" and "id-vlong-ne"
with "id", "id-long" and "id-vlong" respectively which are primary keys for plugin components.
(OFBIZ-9351)
Thanks Aditya Sharma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1796380 13f79535-47bb-0310-9956-ffa450edef68
2017-05-27 11:32:18 +00:00
Jacques Le Roux 4e9ddccde9 Fixed: The help button or link does not show for the Birt, BI and example
components
(OFBIZ-9311)

Pricat was also concerned. Unlike hhfacility, I see no reasons why these 
components would use the GlobalDecorator instead of the ApplicationDecorator
(the ApplicationDecorator embeds the GlobalDecorator)

OFBIZ-9312 is a duplicate of this


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1791116 13f79535-47bb-0310-9956-ffa450edef68
2017-04-12 12:58:38 +00:00
Jacques Le Roux 96dfd1b455 No functional change (demo only), time is passing...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1790934 13f79535-47bb-0310-9956-ffa450edef68
2017-04-11 07:41:43 +00:00
Deepak Dixit 0f2050716f Fixed: Copied sales order item fact related services from order component (OFBIZ-9213)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1782661 13f79535-47bb-0310-9956-ffa450edef68
2017-02-12 11:51:13 +00:00
Deepak Dixit 15bc40e491 Reverted: Minilang code readability and consistency improvements done at r#1768222, this commit reversed key and description of drop-down in the code.
(OFBIZ-9114)

Thanks  Wei Zhang for reporting the issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1772880 13f79535-47bb-0310-9956-ffa450edef68
2016-12-06 12:37:42 +00:00
Divesh Dutta a4567c2486 Improvement: Minilang code readability and consistency improvements.
(OFBIZ-8929) (OFBIZ-8930) (OFBIZ-8953) (OFBIZ-8965) (OFBIZ-8972) (OFBIZ-8986) (OFBIZ-8991) 

Thanks: Ankush Upadhyay, Anuj Jain, Abhijeet for your patches. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1768222 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 14:34:00 +00:00
Divesh Dutta 77af05bc8e Improvement: Miniland code readability and consistency improvements
(OFBIZ-8744) (OFBIZ-8745) (OFBIZ-8746) (OFBIZ-8748) (OFBIZ-8829) (OFBIZ-8830) (OFBIZ-8907) (OFBIZ-8908) (OFBIZ-8924) (OFBIZ-8925) 

Thanks: Ankush Upadhyay , Sega patidar , Abhijeet Ashapure for your patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1768219 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 14:14:04 +00:00
Divesh Dutta 3a17676024 Improvement: Minilang code readibility and conistency improvements
(OFBIZ-8445) (OFBIZ-8447) (OFBIZ-8448) (OFBIZ-8450) ( OFBIZ-8451) (OFBIZ-8653) (OFBIZ-8740) (OFBIZ-8741) (OFBIZ-8742) (OFBIZ-8743)

Thanks: Devanshu Vyas, Anuj Jain, Sega Patidar, Abhijeet Ashapure for your patches

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1768209 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 12:41:35 +00:00
Arun Patidar 8bb8f78872 Improved: Removed semicolon from all Groovy files of all components.
(OFBIZ-8652)

Thanks: Rohit Koushal, Jacques Le Roux and Rishi Solanki for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1767764 13f79535-47bb-0310-9956-ffa450edef68
2016-11-02 19:09:13 +00:00
Arun Patidar 8ea4694610 Implemented: Added CRUD services for SalesInvoiceItemFact, OrderItemAssoc, OrderItemAssocType, OrderItemContactMech, OrderItemGroup, OrderItemPriceInfo, OrderItemRole, OrderItemShipGrpInvRes, OrderItemType and OrderItemTypeAttr entities.
(OFBIZ-8430) (OFBIZ-8581) (OFBIZ-8582) (OFBIZ-8583) (OFBIZ-8584) (OFBIZ-8585) (OFBIZ-8586) (OFBIZ-8587) (OFBIZ-8588) (OFBIZ-8589)

Thanks: Amit Gadaley for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1766116 13f79535-47bb-0310-9956-ffa450edef68
2016-10-21 20:04:30 +00:00
Mridul Pathak 3dec32bd31 Improved: Removed unused imports from groovy files in BI component.
(OFBIZ-8474)

Thanks: Gopal Yadav for contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1765037 13f79535-47bb-0310-9956-ffa450edef68
2016-10-15 11:46:51 +00:00
Jacopo Cappellato 96b22285f4 Implemented: removed the "controller" related logic, that is now provided by the
new ControlFilter, from the ContextFilter; modified existing applications to use 
the two filters in a chain; removed from the other specialized filters all the 
logic that was duplicated or extended from ContextFilter.

A web application, in order to leverage the OFBiz framework, requires that a 
series of objects are in its contexts (servlet context, session and request) 
such as "delegator", "delegatorName", "dispatcher", "security" etc. etc...
This setup is performed by the logic contained in the servlet filter implemented 
by the ContextFilter class.
The execution of this logic is required for the application to run properly.
However, before this commit, in the ContextFilter there was other logic, related 
to access control and redirection rules (some of them performed in coordination 
with the ControlServlet), making it difficult to deploy this filter in all the 
web applications, especially the ones that implement special handling of paths.
In fact, this filter was deployed in most but not all the web application in the 
OFBiz codebase: specifically it was not deployed in web applications that 
require the execution of other filters (e.g. CatalogUrlFilter, etc...) like the 
ones in the "ecommerce" and "solr" components.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1761304 13f79535-47bb-0310-9956-ffa450edef68
2016-09-18 08:08:30 +00:00
Michael Brohl 256efc05e9 Improved: Bi: Consistent form name.
(OFBIZ-8103)

Change all form names to upper camel case for consistency.

Thanks: Tanmay Muley for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1761106 13f79535-47bb-0310-9956-ffa450edef68
2016-09-16 22:22:48 +00:00
Pranay Pandey e44ba95d72 [OFBIZ-7311] - Applied the patch from the ticket. Removing the unused references of the maincss.css from source code, following is done-
1) Removed 'maincss.css' entry from 'allowedPaths' param of from web.xml
Reason: Since, there is no file like 'maincss.css' exist under any includes directory. 
2) Removed the unused references of maincss.css from FTLs, code
<link rel="stylesheet" href="${StringUtil.wrapString(baseUrl!)}/images/maincss.css" type="text/css"/> 
has been removed.
Reason: This is an interesting thing, these FTLs were using the maincss.css located under the images directory.
When I look the history of these files, following were my findings,
The 'maincss.css' file under the 'images' directory exist in release4.0 
http://svn.apache.org/repos/asf/ofbiz/branches/release4.0/framework/images/webapp/images/
after this release, this files no longer exist there.
3) Also, I have updated one file 'InventoryNoticeEmail.ftl' and used the basic HTML code to style, instead of using style defined in 'maincss.css' which were exist in release-4.0
4) Updated some references from 'maincss.css' to style.css in comments.
5) Also removed the entry of including '/images/maincss.css' and '/images/mainrtl.css' in SimpleDecorator
Since, these files no longer exist after release-4.0.

Thanks Wai for reviewing the work and thanks Swapnil M Mane for the contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1758389 13f79535-47bb-0310-9956-ffa450edef68
2016-08-30 13:37:27 +00:00
Mridul Pathak 3992651d52 [OFBIZ-7981] Index.jsp is missing for BI component. Thanks Vishal Chhabria for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1757957 13f79535-47bb-0310-9956-ffa450edef68
2016-08-27 07:19:35 +00:00
Jacques Le Roux 9179f9c8ba Fixes "Remove warnings regarding missing component lib folders" - https://issues.apache.org/jira/browse/OFBIZ-7776 - by cleaning/clearing the references to non existent/empty dirs.
Notes: 
* Also removes empty framework/base/lib/scripting and useless applications\content\lib\uno\README (miss doc in wiki)
* When jpim-0.1.jar will be (hopefully) replaced we can drop lib ref in framework/base/ofbiz-component.xml
* I wonder if we should let the geronimo component alone with only 2 classes, could we not put that in entity or entityext?
 
    



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1755306 13f79535-47bb-0310-9956-ffa450edef68
2016-08-05 12:27:21 +00:00
Deepak Dixit 8f3141cd46 (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00