(OFBIZ-11440)
During refactoring (OFBIZ-7113), the service reader used two different methods to read a
permission service definition if is present alone or in a group. For the alone version a link
was missing between the service and the permission service to resolve correctly the permission.
To solve this problem I reorganized to use only one method to initialize a service model permission.
Other point, an attribute renaming was missed : action -> permissionMainAction, when service permission call was called
Last, these problems weren't detected before due to missing unit test on failure service permission, now cover.
target parameters
(OFBIZ-11418)
Changed target-parameter attribute of the form widget's Lookup field to
use the FlexibleStringExpander type rather than String. This has been
done to allow reference to other form fields which may have had their
parameter-name attribute set to a FlexibleStringExpander expression.
(OFBIZ-10571)
Following refactoring done -
-- Refactored code to fall in line with some java standards.
-- Based on FindBugs suggestion, refactored some classes to have static nested classes instead of inner class.
Thanks Girish Vasmatkar for reporting the issue and providing the patch.
connection-locks
(OFBIZ-11312)
The method DatabaseUtil.getColumnInfo(...) uses an elaborate algorithm using a
List<Future<AbstractCountingCallable>> object. This does not work properly as it
runs into connection-locks. When debugging the error does not occur. I assume
that the slower pace of debugging prevents the error.
Thanks: Benjamin Jugl
Improved: no functional change
(OFBIZ-10837) (OFBIZ-11398)
Steps to generate:
1. Navigate to - catalog/control/EditProdCatalog?prodCatalogId=TestCatalog
2. Click on - CREATE SEO CATEGORY/PRODUCTS
3. The broken page will be displayed
The issue is due to the use of a GString in
createMissingCategoryAndProductAltUrls().
This:
result.successMessageList = [
"Categories updated: ${categoriesUpdated}",
"Products updated: ${productsUpdated}"
As it's common to use such expressions I have added the necessary
org.codehaus.groovy.runtime.GStringImpl groovy.lang.GString
to the white list of classes in listOfSafeObjectsForInputStream in
SafeObjectInputStream.properties
I finally have also decided to use this property as default and commented for
committers to be aware that it should be also put in DEFAULT_WHITELIST_PATTERN
in SafeObjectInputStream class. Because if, for a reason,
listOfSafeObjectsForInputStream is empty OFBiz will still be protected
Thanks: Dikpal Kanungo for reporting
form renderer from String to FlexibleStringExpander
(OFBIZ-4035)
Document that the id-name attribute for a form widget's field
element can use ${} notation. Also document the default value if id-name is
not set.
(OFBIZ-11407)
Overriding the new default property secretRequired to be not required
and added the default property "secret" in the commented out section.
(OFBIZ-11200)
Before this commit, to purge old job we use the thread job manager to check
if some job need to be run and if the pool is empty, check the old job to purge.
I detected a problem when you have many job's server and more than one pool.
When you have a first pool that run regular job and a second that receive
huge asynchrone services (by persist call), the server who manage the second pool
have rarely the possibility to purge their jobs that, by the way, increase JobSandbox table.
The Server who manage the first pool, call often the purge process, but the table size
generate a long query time to purge few element. Long query time, run often,
this purge process load uselessly the database.
After analyze, I refactoring these following items :
* When you call JobSandbox table for a purge, use a limit on the query
with the max thread pool because when you have the database return,
you purge only with this limit so this help the database to not scan
the whole table. Other small improvement, do not sort the result
(no functional gain).
* Purge by the pool thread is nice, each server can only purge their
own job (filtered on run_by_instance_id), to help an overloaded server,
I was rehability purgeOldJobs service that it can run with specific
parameter to make assistance.
* Last, all job services are historical on class org.apache.ofbiz.service.ServiceUtil,
I moved them all in a new dedicate class org.apache.ofbiz.service.job.JobServices
(OFBIZ-11396)
When using variable pattern with replaceFirst you may cross issues if the
pattern contains specific tokens. For instance on Windows with the path
"C:\projectsASF\Git\ofbiz-framework/" you have inside the token "\p" which has
a special meaning.
(OFBIZ-11396)
When using variable pattern with replaceFirst you may cross issues if the
pattern contains specific tokens. For instance on Windows with the path
"C:\projectsASF\Git\ofbiz-framework/" you have inside the token "\p" which has
a special meaning.
(OFBIZ-11158)
EntityQuery usage to perform data fetching is increasing, we should also add support for EntityQuery in ProgramExport feature.
Thanks: Devanshu Vyas for report and patch and Suraj Khurana, Nicolas Malin for the review.
(OFBIZ-11335)
The commit 1941a05a34 introduce the visualTheme
to generate a form with FactoryForm and forms present on FindGeneric has been forget
Thanks to Sebastian Berg for raise this issue
(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.
(OFBIZ-11335)
Related to issue OFBIZ-11335, extends form's factories and form's models
to support a visualTheme during the model creation.
This extend help centralize style information used by forms on a theme.
For performance reason when the model is loaded in memory, all theme information
need to be present to set immutable as possible to put it in cache
(implies why the key cache contains now the visualThemeId).
(OFBIZ-11317)
In some place, like at least themes/tomahawk/template/AppBarClose.ftl the CSRF
token is not generated. Because in those places OfbizUrlTransform is used.
An immediate solution is to add the CSRF token generation in OfbizUrlTransform
class.
A definitive solution is to complete OFBIZ-11229
"Merge UrlRegexpTransform and OfbizUrlTransform classes"
(OFBIZ-11342)
Improved javadoc
Set 'checkMultiLevelAdminPermissionValidity' visibility to default
Add another test verifying that hierarchy in permission is respected
Thanks Mathieu for your review
(OFBIZ-11342)
Add unit tests for permission control feature.
Add new method to manage multilevel permission control.
This allowing an user with PARTYMGR_ADMIN permission to impersonate
another user with PARTYMGR_PCM_CREATE permission.
(OFBIZ-11340)
When a OFBiz server are stopped or crashed with job on queued state,
at the start, they are restarted but without information on tempExprId and recurrenceInfoId
This causes a break for recurrence jobs to their planning
Thanks to Mohammed Rehan Khan for this issue and Scott Gray for the review.
(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
(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
(OFBIZ-10198)
This patch extends the current UtilHttp.urlEncodeArgs() method with an
additional input parameter: boolean preserveEmpty.
It allows to get a query string with empty parameters, useful if the
receiver expects mandatory parameters or wants to explicit
override/clear existing values with an empty one.
Thanks Martin Becker for reporting and providing the patch.
(OFBIZ-10322)
Create a README.adoc stub and help file stub in the new format under
framework/resources/templates and use in the plugin creation task.
Thanks Ulrich Heidfeld for providing the patch.
(OFBIZ-11330)
Allows generation of unique names when repeating rendering of a form on a screen.
Added test cases to ensure parameter names can be built using FlexibleStringExpander.
No functional change
The code present on ViewGeneric.groovy has been migrated from bsh script
without deep rewrite.
I removed all unecessary or redund code to lighten the reading
(OFBIZ-11007)
Some issue has been introduce on the previous commit 6e1c7b5 [1], corrected by this one :
* the view link on ListGeneric failed
* the paginate on ListGeneric failed
I also simplify the url writing with delegate the entity path generation and translation
to two function on EntityUtil : entityToPath and getPkValuesMapFromPath
thanks to Pawan Verma to spot the pagination problem
[1] https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=6e1c7b5