11 Commits
Author SHA1 Message Date
Jacques Le Roux 32d4f793fa Improved: Unable to upload a file through ecommerce (OFBIZ-12636)
Allows to check for only CSV files. This is not used OOTB in OFBiz.

Thanks: Sachin for report and confirmation it's OK
2022-07-20 17:22:28 +02:00
Jacques Le Roux e4b383cd88 Fixed: Integration tests fail with Postgres DB (OFBIZ-12666)
This fixes testUpdateFixedAssetMaintAndWorkEffort. It works in both Derby and
Postgres

Thanks: Johannes Schreiber for report
2022-07-18 08:37:50 +02:00
Jacques Le Roux 1052d9a983 Fixed: Update Solr and Lucene from 8.11.1 to 8.11.2 for security reason (OFBIZ-12656)
There was fixed security issues in Solr:
https://lists.apache.org/thread/wn9wkmx1ogbf00hj78y2xt3l0bo15ob9
Not in Lucene, but we need sync between them:
https://lists.apache.org/thread/olf2bhqy1ws9f0kp9nb8zs6g5dcl89l5
2022-06-22 11:55:12 +02:00
Pierre Smits 60f2664441 Fixed: AssetMaint not accessible by user with 'VIEW' permission (OFBIZ-12485) (#71)
Currently the AssetMaint application is not accessible by a user with the VIEW permission, as demonstrated with userLoginId = 'auditor'.

Modfied: AssetMaintSecurityGroupDemoData.xml: added SecurityGroupPermission record
2022-05-12 20:09:10 +02:00
Nicolas Malin 0a635267e5 Fixed: Request createWorkEffortPartyAssign generates an error (OFBIZ-12556)
The request createWorkEffortPartyAssign is called after submitting the form AddWorkEffortPartyAssign, when the user wants to add a party to a project. This raise an error because it removed from workeffort component after the screen dynamising
Thanks to Pierre Smith for raise this issue and Martin Naumann for the fix patch
2022-04-22 11:59:22 +02:00
Jacques Le Roux 68c7a4107d Improved: projectView doesn't show the newly created project after creation ( (OFBIZ-12601)
"Previously" the project creation directly lead to the ProjectView screen within
the context of the newly created project. In this way users were able to
directly add e.g. resources to the newly created project without selecting it
again within the FindProject screen. Within the patch provided I just copied the
success handling from the updateProject request mapping which seems to restore
the initial functionality again.

jleroux: Even if I don't know to what to compare in past, I indeed see no
reasons to not do so.

Thanks: Sixty One for the patch
2022-04-20 09:38:06 +02:00
Jacques Le Roux 2f2a448d71 Fixed: Solr requires application/x-www-form-urlencoded (OFBIZ-12600)
Solr plugin fires exception on create/update of a product.

1.) enable eca in solrconfig.properties: solr.eca.enabled=true
2.)  enable all eca in eecas.xml
3.) start ofbiz
4.) update or create a product (go to product and save it)
the error is fired.

Thanks: Ingo Wolfmayr for report
2022-04-14 15:46:17 +02:00
Jacques Le Roux 656b9c20c7 Fixed: Test run was unsuccessful because of failing solr tests (OFBIZ-12595)
The previous commit for OFBIZ-12594 was only working on Windows. On *nix OSs
there is no way to reliably get "--test" String from java.class.path property.

Also the previous fix was brittle because relying only on 1 space separating
words.

This fix puts in the SolrDispatchFilter system property at the beginning of the
4 Solr tests and removes it at end of them. That presence can reliably be tested
in ControlFilter that is called before SolrDispatchFilter. It allows to bypass
SecurityUtil::containsFreemarkerInterpolation that would else change the
parameters content type that must be application/x-www-form-urlencoded.
content

Thanks: Tom Pietsch for report and Mart Naum for confirmation
2022-04-13 14:47:03 +02:00
Jacques Le Roux f29c84c052 Improved: Remove deprecation warning by removing direct call to Class::newInstance
Class.newInstance() has a flaw, in which any Throwable from the constructor is
thrown unchecked. It was deprecated in Java 9, but not marked for removal.
It shows as a deprecation warning when compiling OfBiz with Java 11.

Thanks: Heinz Kabutz for reporting and initially committing 0e6732b. This
completes in plugins and all will we backported
2022-04-01 11:07:33 +02:00
Benjamin Jugl bef13b56ef Fixed: Setting VIEW_INDEX to 0 in ForumScreens.xml when not initialized (OFBIZ-11429) 2022-02-22 23:19:21 +01:00
Jacques Le Roux 1edb5f71ed Fixed: placeholder text has been implemented but seems to do nothing (OFBIZ-12548)
Adding this to a form in a widget/somethingForms.xml file:

<field name="description" title="${uiLabelMap.CommonDescription}"
required-field="true"><text placeholder="This is placeholder text"/></field>

Does not throw a error, but when the form is displayed, no placeholder text
appears.  I've checked the html code in the browser to confirm that it wasn't
white placeholder text on a white background, and it does not define the
placeholder property in the generated html.

Are there any cases where placeholder text does work?  If so, it would be nice
if a working example could be added somewhere (like someone in ofbiz,
or maybe in the "example" plugin)

Thanks: ddev for report and spotting the missed commit of
OFBIZ-5341-Example.patch in OFBIZ-5341
2022-02-01 08:49:49 +01:00
25 changed files with 249 additions and 75 deletions
-3
View File
@@ -29,6 +29,3 @@ github:
- https
- content
- geospatial
notifications:
jobs: notifications@ofbiz.apache.org
@@ -222,7 +222,8 @@ under the License.
<#list notes as note>
<fo:table-row>
<fo:table-cell>
<fo:block>Author : ${Static["org.apache.ofbiz.party.party.PartyHelper"].getPartyName(delegator, note.noteParty, true)}</fo:block>
<fo:block>Author : ${Static[
"org.apache.ofbiz.party.party.PartyHelper"].getPartyName(delegator, note.noteParty, true)}</fo:block>
<fo:block>Date : ${note.noteDateTime?string.short}</fo:block>
<#escape x as x?html>
<fo:block>${note.noteInfo!}</fo:block>
@@ -19,6 +19,7 @@ under the License.
<html>
<body>
<#if requestParameters.detail?has_content>
<#--assign detailImage = Static["org.apache.ofbiz.base.util.Base64"].base64Decode(requestParameters.detail)-->
<img src="${requestParameters.detail}" alt=""/>
<#else>
<script type="application/javascript">
@@ -21,7 +21,7 @@ under the License.
<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Site-Conf" xsi:schemaLocation="http://ofbiz.apache.org/Site-Conf http://ofbiz.apache.org/dtds/site-conf.xsd">
<description>OFBiz: eCommerce Controller Configuration File</description>
<errorpage>component://common/webcommon/error/Error.ftl</errorpage>
<handler name="java" type="request" class="org.apache.ofbiz.webapp.event.JavaEventHandler"/>
@@ -1429,6 +1429,27 @@ under the License.
<response name="error" type="view" value="EditBlogArticle"/>
</request-map>
<!--request-map uri="persistBlogSummary">
<security https="false" auth="true"/>
<event type="service" invoke="persistContentAndAssoc"/>
<response name="success" type="view" value="EditBlog"/>
<response name="error" type="view" value="EditBlog"/>
</request-map>
<request-map uri="persistBlogText">
<security https="false" auth="true"/>
<event type="service" invoke="persistContentAndAssoc"/>
<response name="success" type="view" value="EditBlog"/>
<response name="error" type="view" value="EditBlog"/>
</request-map>
<request-map uri="persistBlogImage">
<security https="false" auth="true"/>
<event type="service" invoke="persistContentAndAssoc"/>
<response name="success" type="view" value="EditBlog"/>
<response name="error" type="view" value="EditBlog"/>
</request-map-->
<request-map uri="createBlogResponse">
<security https="true" auth="true"/>
<event type="service" invoke="createTextContent"/>
@@ -1788,12 +1809,12 @@ under the License.
<security https="false" auth="false"/>
<response name="success" type="view" value="compareProducts" save-last-view="true"/>
</request-map>
<request-map uri="ProductUomDropDownOnly">
<security auth="false" https="false"/>
<response name="success" type="view" value="ProductUomDropDownOnly" save-current-view="false" save-last-view="true"/>
</request-map>
<!-- Captcha: Image request, the captcha code is stored in the session using _CAPTCHA_CODE_ as the key -->
<request-map uri="captcha.jpg">
<security https="true" auth="false"/>
@@ -1993,18 +2014,18 @@ under the License.
<!-- One Page Checkout -->
<view-map name="OnePageCheckout" type="screen" page="component://ecommerce/widget/OrderScreens.xml#OnePageCheckout"/>
<view-map name="compareProducts" type="screen" page="component://ecommerce/widget/OrderScreens.xml#compareProducts"/>
<!-- Product in the different UOM -->
<view-map name="ProductUomDropDownOnly" type="screen" page="component://ecommerce/widget/CatalogScreens.xml#ProductUomDropDownOnly"/>
<!-- Contact List -->
<view-map name="ContactListOptOut" type="screen" page="component://marketing/widget/ContactListScreens.xml#OptOutResponse"/>
<!-- Product Category 's Ajax -->
<view-map name="productCategoryList" type="screen" page="component://ecommerce/widget/CatalogScreens.xml#productCategoryList"/>
<!-- Shopping List 's Ajax -->
<view-map name="showShoppingList" type="screen" page="component://ecommerce/widget/ShoppingListScreens.xml#showShoppingList"/>
<!-- End of View Mappings -->
</site-conf>
@@ -163,4 +163,9 @@ under the License.
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/error/404.jsp</location>
</error-page>
</web-app>
+54
View File
@@ -0,0 +1,54 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--%>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.ofbiz.base.util.*" %>
<%@ page import="org.apache.ofbiz.entity.*" %>
<%@ page import="org.apache.ofbiz.entity.util.*" %>
<%@ page import="org.apache.ofbiz.webapp.website.WebSiteWorker" %>
<jsp:useBean id="delegator" type="org.apache.ofbiz.entity.GenericDelegator" scope="request" />
<%
ServletContext context = pageContext.getServletContext();
String webSiteId = WebSiteWorker.getWebSiteId(request);
List<GenericValue> webAnalytics = delegator.findByAnd("WebAnalyticsConfig", UtilMisc.toMap("webSiteId", webSiteId), null, false);
%>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Error 404</title>
<%if (webAnalytics != null) {%>
<script type="application/javascript">
<%for (GenericValue webAnalytic : webAnalytics) {%>
<%=StringUtil.wrapString((String) webAnalytic.get("webAnalyticsCode"))%>
<%}%>
</script>
<%}%>
</head>
<body>
<p>
<strong>404.</strong>
<ins>That&#39;s an error.</ins>
</p>
<p>
The requested URL
<code><%=request.getAttribute("filterRequestUriError")%></code>
was not found on this server.
<ins>That&#39;s all we know.</ins>
</p>
</body>
</html>
+5
View File
@@ -156,4 +156,9 @@ under the License.
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/error/404.jsp</location>
</error-page>
</web-app>
+17 -30
View File
@@ -17,7 +17,7 @@
specific language governing permissions and limitations
under the License.
-->
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
<form name="EditProject" type="single" target="updateProject" default-map-name="projectInfo"
header-row-style="header-row" default-table-style="basic-table">
@@ -164,7 +164,7 @@
<field-map field-name="distinct" value="Y"/>
<field-map field-name="orderBy" value="-lastStatusUpdate"/>
<field-map field-name="viewIndex" from-field="viewIndex"/>
<field-map field-name="viewSize" from-field="viewSize"/>
<field-map field-name="viewSize" from-field="viewSize"/>
</service>
</actions>
<row-actions>
@@ -186,40 +186,27 @@
<field name="actualHours" map-name="resultProject.projectInfo" title="${uiLabelMap.ProjectMgrActualHours}"><display/></field>
<field name="createdStamp" title="${uiLabelMap.FormFieldTitle_createdDate}"><display type="date"/></field>
</form>
<form name="ListCurrentProjects" type="list" list-name="listIt" paginate-target="main"
<form name="ListCurrentProjects" type="list" list-name="projects" paginate-target="main"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<actions>
<set field="parameters.workEffortTypeId" value="PROJECT"/>
<set field="fieldList[]" value="workEffortId"/>
<set field="fieldList[]" value="lastStatusUpdate"/>
<service service-name="performFind" result-map-list="listIt">
<field-map field-name="fieldList" from-field="fieldList"/>
<field-map field-name="inputFields" from-field="parameters"/>
<field-map field-name="entityName" value="WorkEffortAndPartyAssign"/>
<field-map field-name="distinct" value="Y"/>
<field-map field-name="orderBy" value="-lastStatusUpdate"/>
<field-map field-name="viewIndex" from-field="viewIndex"/>
<field-map field-name="viewSize" from-field="viewSize"/>
</service>
<script location="component://projectmgr/groovyScripts/ListCurrentProjects.groovy"/>
</actions>
<row-actions>
<service service-name="getProject" result-map="resultProject">
<field-map field-name="projectId" value="${workEffortId}"/>
</service>
<script location="component://projectmgr/groovyScripts/ProjectIsBillable.groovy"/>
</row-actions>
<field name="projectName" map-name="resultProject.projectInfo" title="${uiLabelMap.ProjectMgrProjectName}" widget-style="buttontext">
<hyperlink description="${resultProject.projectInfo.projectName}" target="projectView">
<parameter param-name="projectId" from-field="resultProject.projectInfo.projectId"/>
<field name="projectName" title="${uiLabelMap.ProjectMgrProjectName}" widget-style="buttontext">
<hyperlink description="${projectName}" target="projectView">
<parameter param-name="projectId"/>
</hyperlink>
</field>
<field name="createdDate" map-name="resultProject.projectInfo" title="${uiLabelMap.FormFieldTitle_createdDate}"><display type="date"/></field>
<field name="currentStatusId" map-name="resultProject.projectInfo" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
<field name="estimatedStartDate" map-name="resultProject.projectInfo" title="${uiLabelMap.FormFieldTitle_estimatedStartDate}"><display type="date"/></field>
<field name="estimatedCompletionDate" map-name="resultProject.projectInfo" title="${uiLabelMap.FormFieldTitle_estimatedCompletionDate}"><display type="date"/></field>
<field name="actualStartDate" map-name="resultProject.projectInfo" title="${uiLabelMap.FormFieldTitle_actualStartDate}"><display type="date"/></field>
<field name="actualCompletionDate" map-name="resultProject.projectInfo" title="${uiLabelMap.FormFieldTitle_actualCompletionDate}"><display type="date"/></field>
<field name="plannedHours" map-name="resultProject.projectInfo" title="${uiLabelMap.ProjectMgrPlannedHours}"><display/></field>
<field name="actualHours" map-name="resultProject.projectInfo" title="${uiLabelMap.ProjectMgrActualHours}"><display/></field>
<field name="currentStatusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
<field name="estimatedStartDate" title="${uiLabelMap.FormFieldTitle_estimatedStartDate}"><display type="date"/></field>
<field name="estimatedCompletionDate" title="${uiLabelMap.FormFieldTitle_estimatedCompletionDate}"><display type="date"/></field>
<field name="actualStartDate" title="${uiLabelMap.FormFieldTitle_actualStartDate}"><display type="date"/></field>
<field name="actualCompletionDate" title="${uiLabelMap.FormFieldTitle_actualCompletionDate}"><display type="date"/></field>
<field name="plannedHours" title="${uiLabelMap.ProjectMgrPlannedHours}"><display/></field>
<field name="actualHours" title="${uiLabelMap.ProjectMgrActualHours}"><display/></field>
<field name="actualNonBilledHours" title="${uiLabelMap.ProjectMgrNonBilledActualHours}"><display description="${groovy:isBillable&amp;&amp;actualNonBilledHours!=void?actualNonBilledHours:&quot;&quot;}"/></field>
<field name="createdStamp" title="${uiLabelMap.FormFieldTitle_createdDate}"><display type="date"/></field>
</form>
<form name="EditSubProjects" list-name="projects" type="list" target="RemoveSubProject"
@@ -599,7 +586,7 @@
<condition-list combine="and">
<condition-expr field-name="roleTypeId" operator="equals" value="PROJECT_TEAM"/>
<condition-expr field-name="statusId" operator="not-equals" value="PARTY_DISABLED"/>
</condition-list>
</condition-list>
<select-field field-name="partyId"/>
<select-field field-name="lastName"/>
<select-field field-name="firstName"/>
+3 -3
View File
@@ -27,9 +27,9 @@ dependencies {
pluginLibsCompile 'org.glassfish.jersey.media:jersey-media-multipart:2.31'
pluginLibsCompile 'org.glassfish.jersey.media:jersey-media-json-jackson:2.31'
pluginLibsCompile 'org.glassfish.jersey.inject:jersey-hk2:2.31'
pluginLibsCompile 'io.swagger.core.v3:swagger-jaxrs2:2.2.1'
pluginLibsCompile 'io.swagger.core.v3:swagger-jaxrs2-servlet-initializer:2.2.1'
pluginLibsCompile 'io.swagger.core.v3:swagger-annotations:2.2.1'
pluginLibsCompile 'io.swagger.core.v3:swagger-jaxrs2:2.1.10'
pluginLibsCompile 'io.swagger.core.v3:swagger-jaxrs2-servlet-initializer:2.1.10'
pluginLibsCompile 'io.swagger.core.v3:swagger-annotations:2.1.10'
}
task install {
@@ -159,12 +159,10 @@ public final class OpenApiUtil {
}
private static void buildApiResponseSchemas() {
Schema<?> genericErrorSchema = new MapSchema();
genericErrorSchema.addProperty("statusCode", new IntegerSchema().description("HTTP Status Code"));
genericErrorSchema.addProperty("statusDescription", new StringSchema().description("HTTP Status Code Description"));
genericErrorSchema.addProperty("errorType", new StringSchema().description("Error Type for the error"));
genericErrorSchema.addProperty("errorMessage", new StringSchema().description("Error Message"));
Schema<?> genericErrorSchema = new MapSchema().addProperties("statusCode", new IntegerSchema().description("HTTP Status Code"))
.addProperties("statusDescription", new StringSchema().description("HTTP Status Code Description"))
.addProperties("errorType", new StringSchema().description("Error Type for the error"))
.addProperties("errorMessage", new StringSchema().description("Error Message"));
SCHEMAS.put("api.response.unauthorized.noheader", genericErrorSchema);
SCHEMAS.put("api.response.unauthorized.invalidtoken", genericErrorSchema);
SCHEMAS.put("api.response.forbidden", genericErrorSchema);
@@ -285,7 +283,7 @@ public final class OpenApiUtil {
}
Schema<?> attrSchema = getAttributeSchema(service, param);
if (attrSchema != null) {
parentSchema.addProperty(name, getAttributeSchema(service, service.getParam(name)));
parentSchema.addProperties(name, getAttributeSchema(service, service.getParam(name)));
}
});
parentSchema.setRequired(required);
@@ -335,7 +333,7 @@ public final class OpenApiUtil {
if (!param.isOptional()) {
required.add(childParam.getName());
}
schema.addProperty(childParam.getName(), getAttributeSchema(service, childParam));
schema.addProperties(childParam.getName(), getAttributeSchema(service, childParam));
}
schema.setRequired(required);
}
@@ -348,15 +346,15 @@ public final class OpenApiUtil {
Schema<Object> parentSchema = new Schema<Object>();
parentSchema.setDescription("Out Schema for service: " + service.getName() + " response");
parentSchema.setType("object");
parentSchema.addProperty("statusCode", new IntegerSchema().description("HTTP Status Code"));
parentSchema.addProperty("statusDescription", new StringSchema().description("HTTP Status Code Description"));
parentSchema.addProperty("successMessage", new StringSchema().description("Success Message"));
parentSchema.addProperties("statusCode", new IntegerSchema().description("HTTP Status Code"));
parentSchema.addProperties("statusDescription", new StringSchema().description("HTTP Status Code Description"));
parentSchema.addProperties("successMessage", new StringSchema().description("Success Message"));
Schema<Object> dataSchema = new Schema<Object>();
parentSchema.addProperty("data", dataSchema);
parentSchema.addProperties("data", dataSchema);
service.getOutParamNamesMap().forEach((name, type) -> {
Schema<?> attrSchema = getAttributeSchema(service, service.getParam(name));
if (attrSchema != null) {
dataSchema.addProperty(name, getAttributeSchema(service, service.getParam(name)));
dataSchema.addProperties(name, getAttributeSchema(service, service.getParam(name)));
}
});
return parentSchema;
@@ -387,7 +385,7 @@ public final class OpenApiUtil {
e.printStackTrace();
}
if (schemaClass != null) {
dataSchema.addProperty(fieldNm, schema.description(fieldNm));
dataSchema.addProperties(fieldNm, schema.description(fieldNm));
}
}
return dataSchema;
+2 -2
View File
@@ -4,12 +4,12 @@ You can choose between Swagger UI and Redoc to publish documentation for the RES
== Swagger
Current version: swagger-ui-4.2.1
Current version: swagger-ui-3.45.1
Access: https://localhost:8443/docs/swagger-ui.html
== Redoc
Current version: redoc@2.0.0-rc.59
Current version: redoc@2.0.0-rc.50
Accesss: https://localhost:8443/docs/redoc.html
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5
View File
@@ -46,5 +46,10 @@ solr.client.connection.timeout=
# If true, trust self signed certification, default is false.
solr.client.trust.selfsigned.cert=true
# Defines Solr specific log directory
solr.log.dir=runtime/logs/solr
# Defines Solr log level
solr.log.level=INFO
# Define the location of its home, speeds loading
solr/home=/plugins/solr/home