Commit Graph
1959 Commits
Author SHA1 Message Date
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 a2dac5482c Improved: Default ordering of webapps titles in main menu (OFBIZ-12166)
[...] having more important apps in 1st places would be better [...]
the feature should be easily changed by custom projects [...]
documentation for that would be enough.

This 1st step sorts the applications and webtools. I believe webtools should not
be secondary but that needs to be discussed with other options.
2021-02-14 21:11:58 +01:00
Jacques Le Roux da134243f7 Fixed: issue put in with r1160964 (9 years, 5 months ago)
Fixes a syntax issue spotted while testing FreeMarker 2.3.31
2021-02-13 18:12:00 +01:00
Jacques Le Roux 432c7bde98 Fixed: Use from-field pattern instead of value=${***} pattern in 'set' element (OFBIZ-9607)
Fixes a syntax issue spotted while testing FreeMarker 2.3.31
2021-02-13 18:12:00 +01:00
Michael Brohl 662a3f9d1c Improved: Remove Compdoc functionality from content manager
(OFBIZ-10476)
2021-02-13 17:33:05 +01:00
Wiebke Pätzold fab0783722 Improved: Used uppercase 'L' as suggested by checkstyle (OFBIZ-12169) 2021-02-10 12:44:44 +01:00
Wiebke Pätzold 03960053a8 Improved: Replaced '.*' import form (OFBIZ-12169) 2021-02-09 11:30:18 +01:00
Wiebke Pätzold b65be41fc7 Improved: if else construct must use parentheses (OFBIZ-12169) 2021-02-09 09:11:48 +01:00
Wiebke Pätzold 2fe5e15a83 Improved: Adds newline at the end of file (OFBIZ-12169) 2021-02-08 16:31:13 +01:00
Benjamin Jugl f5788b2a81 Improved: Converts DataServices.xml to Groovy. (OFBIZ-11469) 2021-02-01 17:08:46 +01:00
Nicolas Malin 7165768251 Implemented: Add a framework method to get main webapp menu with the webapp name
(OFBIZ-10601)

To improve theme management and provide better tools for new themes, we implement a method to obtain the main menu of a webapp.
Instead of just managing a menu, we extend the functionality by offering a method to expose a summary of the webapp, to simplify the navigation.

For this we add a new attribute on webapp definition app-shortcut-screen :

    <webapp name="mywebapp"
            ...
            app-shortcut-screen="component://mycomponent/widget/CommonScreens.xml#ShortcutApp"
            ...
    />

The idea is to define a new purpose screen *Shortcut* that contains what defines a webapp when an action or navigation has been requested. With this screen you can load a menu, a search, a complex description and use all screen powerfulness to resolve what displaying and support by theming

    <screen name="ShortcutApp">
        <section>
            <actions>
                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
            </actions>
            <widgets>
                <decorator-screen name="ShortcutDecorator" location="component://common/widget/CommonScreens.xml">
                    <decorator-section name="body">
                        <include-menu name="MyShortcutAppBar" location="component://mycomponent/widget/CommonMenus.xml"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

Each component are self-sufficient to define what shortcuts to display without framework change or knowledge about other component.
Each theme can implement and customize the display rendering at will.

To illustrate an example of implementation we set sub menu for each webapp defined on applications and exploit it on bluelight theme.

Thanks for Dennis Balkir, Jacques Leroux, Leila Mekika and Julien Nicolas for their involvement
2021-01-15 08:56:23 +01:00
Daniel Watford 3795727ea2 Improved: MacroFormRenderer refactoring of label, display and text
fields

(OFBIZ-11900)

New RenderableFtl elements to represent pre-rendered FTL strings and FTL
macro calls. RenderableFtl elements are able to render themselves to
strings which are processed as an FTL template by the FtlWriter class.

For labels, display fields and text fields, MacroFormRenderer no longer
generates FTL to write to a template itself, but instead calls
RenderableFtlFormElementsBuilder to create corresponding RenderableFtl
elements which are then processed by FtlWriter. This is a WIP to reduce
complexity in MacroFormRenderer.
2021-01-12 10:40:58 +00:00
Jacques Le Roux ec2b84341e Reverted: "Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)"
This reverts commit 17eb2e4cf7.

It does not work when using <<target="javascript:........>>
I could change those cases but it's easier and safer to simply revert back to
target-type!

Thanks: James for report
2020-12-18 11:08:32 +01:00
Jacques Le Roux 17eb2e4cf7 Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)
Same for sub-hyperlink
2020-12-11 16:52:04 +01:00
Jacques Le Roux fdeedf23ee Improved: Adds the HTML <input> accept Attribute in form widgets and Freemaker templates (OFBIZ-12049)
As explained at
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept
this is only an help for the users (ie not a security feature), but an
appreciable one easy to implement.

Here we start with website/WebSiteCMSContent.ftl
Also add some missing file extensions
2020-12-07 18:45:25 +01:00
Jacques Le Roux 5fa312cfb9 Fixed: Secure the uploads (OFBIZ-12080)
Improves the labels names and format comment in LayoutEvents.java

I backport to ease later works...
2020-12-06 11:16:44 +01:00
Jacques Le Roux a0e8a23a18 Fixed: Secure the uploads (OFBIZ-12080)
validateUploadedFile() fixes another case reported in August by Harshit
2020-12-06 10:20:57 +01:00
Jacques Le Roux e73616caf1 Fixed: Secure the uploads (OFBIZ-12080)
2020/08/10 the OFBiz security team received a security report by Harshit Shukla
<harshit.shukz@gmail.com>, roughly it was (quoting part of it to simplify):

<<I have identified a Remote Code Execution (RCE) Vulnerability. The reason
behind this RCE is lack of file extension check at
catalog/control/UploadCategoryImage?productCategoryId=CATALOG1_BEST_SELL&pload_file_type=category>>

Using this post-auth RCE in OFBiz demos, Harshit was able to get some AWS
credentials by uploading a webshell (based on [0]).
By security, it was then decided by the Infra and OFBiz security teams to shut
down the demos.

After discussing the elements reported with Mark J Cox (VP of ASF security team)
we in common decided that no CVE was necessary.
2020-12-01 10:16:04 +01:00
Nicolas Malin 12162a2a9c Fixed: Create a blog article failed to link each contents
(OFBIZ-12075)

When you create a blog article with screen https://localhost:8443/content/control/EditBlogArticle?blogContentId=${blogId} by default you can create an article with a summary, an image and a long text.

After the creation all content related to this article was created by impossible to display this article correctly. The problem come from the contentAssoc of each relation where the mapKey isn't populate.

The root come from the conversion to entity-auto for the service createContent, where some seca are present and use some field to create some relation with attribute not present on a content (like the field mapKey)

To correct this I the simple way is to authorize these fields, and think for the future how do better.
2020-11-30 09:17:21 +01:00
holivier 98631771aa Documented: Synchronize wiki page End User Documentation (OFBIZ-12059)
- Add facility.adoc with only overview
- Correction for Content Management title
- in General glossary, add link to main components
- Complete Order management overview
- Add a short overview for Party
- Ordered applications in user-manual in alphabetic order
2020-11-16 17:00:48 +01:00
Jacques Le Roux 2fe76bead8 Improved: Misc trivial changes done while working on others issues 2020-11-11 20:43:59 +01:00
Jacques Le Roux 07cb19c0b1 Improved: Reflected XSS in content component (OFBIZ-11840)
Adds some more case and explains things better, no backport
2020-11-11 20:30:11 +01:00
holivier 4a41f0fde5 Documented: migration to help system using asciidoc files (OFBIZ-11587)
commit correction for <Remove all related help docbook files>
* reAdd a contentDocData for main contentId and portletCategory
* remove from ofbiz-component of each application line about helpData which are removed
2020-10-27 11:20:09 +01:00
holivier 302bc0eb15 Documented: migration to help system using asciidoc files (OFBIZ-11587)
Remove all related help docbook files
2020-10-26 17:34:03 +01:00
Suraj Khurana 1ff8957032 Improved: Corrected some spacing issues in code, where there are extra white spaces, this will fix some checkstyle issues in applications component.
(OFBIZ-12022)
2020-09-26 14:18:28 +05:30
Suraj Khurana b3fcbeedba Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in applications component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements. Thanks Jacques for review.
2020-09-12 12:09:03 +05:30
Suraj Khurana 5f021ce06b Improved: Corrected line is longer than 150 characters checkstyle issues in applications component.
(OFBIZ-11921)
Also fixed some other extra space and naming related checkstyle issues observed.
Thanks Jacques for review.
2020-09-04 12:24:14 +05:30
Suraj Khurana ca9fa4fba4 Improved: Corrected line is longer than 150 characters checkstyle issues in framework and applications component.
(OFBIZ-11921)
Also fixed some extra spaces and naming conventions related checkstyle issues.
Thanks Jacques for review.
2020-08-31 19:54:54 +05:30
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
Jacques Le Roux 2d033df446 Improved: Update information in README.md files from removed pages in wiki 2020-08-29 17:37:18 +02:00
Jacques Le Roux c8c5895707 Reverted: "Improved: Have a readme in every component (OFBIZ-6243)"
This reverts commit f281fe290a.

An Apache URL is much easier to have (NO bad idea)
2020-08-29 13:52:27 +02:00
Jacques Le Roux f281fe290a Improved: Have a readme in every component (OFBIZ-6243)
An Apache URL is much easier to have
2020-08-29 13:49:41 +02:00
Jacques Le Roux ee0968440e Improved: Have a readme in every component (OFBIZ-6243)
Not sure why we have this problem (according to
https://docs.github.com/en/github/authenticating-to-github/about-anonymized-image-urls
could be to missing cache control in our site server)

As I was fed up not viewing the OFBIz logo anywhere, and mostly in GH,
but just in browser at https://ofbiz.apache.org/images/ofbiz_logo.png
and I noticed I was viewing it well locally at
https://github.com/apache/ofbiz-framework/tree/trunk/themes/rainbowstone
so decided to use this URL everywhere rather!
2020-08-29 13:35:14 +02:00
Jacques Le Roux d15cc57bf0 Improved: Have a readme in every component (OFBIZ-6243)
This preludes the move of content of README.md files into the asciidoc
documentation

Updates the link to OFBiz-logo.png
Removes deprecated information related to Svn, Jira and Confluence
We will move the wiki pages to wiki attic with OFBIZ-11619
2020-08-29 11:52:51 +02:00
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
Suraj Khurana 371aab1e5b Improved: Corrected class names, method names, data members of class and variables names in application components.
(OFBIZ-11926)
Also corrected some formatting and line length related checkstyle issues.
2020-08-26 21:37:41 +05:30
Akash Jain b9fede6c26 Improved: Unit test case for service - getContent (OFBIZ-8547) 2020-08-26 15:49:20 +05:30
James Yong 9960b1cdb8 Improved: Move page-specific script links to html template (OFBIZ-11799)
Use importLibrary js function to load jstree in DisplayContentNav.ftl.
Tested page at
/exampleext/control/showHelp?helpTopic=EXAMPLEEXT_main&portalPageId=&formName=help&presentation=undefined&id=undefined
2020-08-23 12:23:15 +08:00
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
Pawan Verma 271e3c9bd5 Improved: Convert createCommEventContentAssoc service from mini-lang to groovy DSL(OFBIZ-11380)
Thanks, Devanshu for report, rushikesh and priya for the patch and Suraj and jacques for the review.
2020-08-22 19:09:44 +05:30
James Yong 1f9c300027 Improved: Move page-specific script links to html template (OFBIZ-11799)
Use importLibrary js function to load jstree and cookie js in ContentNav.ftl and CategoryTree.ftl.
Tested on
/content/control/navigateContent
/humanres/control/main
2020-08-22 21:11:20 +08:00
Suraj Khurana d74742d730 Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in applications component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements.
Thanks jacques for finalizing Javadoc pattern during this effort.
2020-08-22 13:00:17 +05:30
Pawan Verma 568fa2c173 Improved: Convert updateSingleContentPurpose service from mini-lang to groovy DSL(OFBIZ-11367)
Thanks: Devanshu for report and Sourabh for the patch.
2020-08-22 10:44:02 +05:30
Suraj Khurana 413e0ec3ec 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 applications component. Also corrected some variables as per naming convention best practices.
Thanks Jacques for review.
2020-08-17 12:25:56 +05:30
James Yong 39c1e280f9 Improved: Move page-specific script links to html template (OFBIZ-11799)
refactoring +
importLibrary function to use crossDomain = true to allow js file to be shown under browser's sources folder
2020-08-16 18:05:32 +08:00
James Yong 55df1c7db0 Improved: Move page-specific script links to html template (OFBIZ-11799)
Use importLibrary js function to load elrte js and css
Tested on
https://localhost:8443/content/control/findForumMessages?forumGroupId=WebStoreFORUM&forumId=10000
https://localhost:8443/content/control/WebSiteCms?webSiteId=CmsSite
2020-08-16 14:35:35 +08:00
Priya Sharma 3fe72d440f Improved: Remove unused imports from Java files (OFBIZ-11930) (#222)
Improved: Remove unused imports from Java files
(OFBIZ-11930)
Thanks: Priya Sharma
2020-08-06 19:51:09 +05:30
Suraj Khurana dd1af9f358 Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-framework into trunk 2020-08-06 18:47:12 +05:30
Suraj Khurana 6ca9bf3102 Improved: Corrected all redundant modifiers occurences from applications component. Also, fixed some other checkstyle line formatting and spacing issues.
(OFBIZ-11925)
2020-08-06 16:52:22 +05:30
Akash Jain dd04252593 Improved: Unit test case for some content services (OFBIZ-8420)
Covered following tickets/services,
OFBIZ-8420 --> createDataCategory
OFBIZ-8421 --> updateDataCategory
OFBIZ-8422 --> removeDataCategory
OFBIZ-8424 --> createDataResourceRole
OFBIZ-8425 --> updateDataResourceRole
OFBIZ-8426 --> removeDataResourceRole

Thanks, Tanmay Muley for reporting the issue.
2020-08-03 16:31:10 +05:30