sub classes
(OFBIZ-10209)
Arun:
Most "liquid" assets should be first (i.e Bank/Cash before Inventory) so need
to provide support to sort GLAccount classes.
Add seqId to GlAccountClass entity to support the sorting of GLAccount sub
classes.
Suraj:
Also rearranged GlAccountClass data in a logical grouping for better readability
Jacques:
I counted 35 lines GlAccountClass moved, did not check each line
Thanks: Arun Patidar for report and Suraj Khurana for the patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823737 13f79535-47bb-0310-9956-ffa450edef68
Add zipFileStream method that will zip FileStream to a zipped one.
Add unzipFileToFolder method to unzip a given archive to a given Folder.
Add fileUtil groovy test suite that create zip file containing README.md, then unzip it to tmp folder and compare original and unzipped files.
Thanks Jacques for the review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823567 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10206)
Updates the security.properties content related to JWT
Refers to the last up to date external-server-test-example.patch at OFBIZ-10206
Makes demo-trunk.ofbiz.apache.org default external-server-name so that anybody
can try the feature from own machine. The use-external-server=Y was already set
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823467 13f79535-47bb-0310-9956-ffa450edef68
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
(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
CategoryServices.xml
(OFBIZ-10146)
While doing some conversions from MiniLang to Groovy, I stumbled across these
methods:
loadBestSellingCategory
RemoveProductFromBestSellCategory
AddProductToBestSellCategory
FindCategoryChild
FindBestSellingProduct
These are all in CategoryServices.xml.
I started realizing, that the simple-method loadBestSellingCategory doesn't
work right (there are some logical failures in it) and while fixing it,
I searched for places where this is used, but couldn't find any.
I started looking deeper into it and found that all of these methods are never
used anywhere in OFBiz, neither are the services which are declared for these
methods.
This is why I propose to remove them; they have no real use, since they don't
work properly, and also are never used.
Thanks: Dennis Balkir
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822978 13f79535-47bb-0310-9956-ffa450edef68
In a groovy service to call the security object you need to do : Security security = dispatcher.dispatchContext.security
For simplification, I set the security object in groovy context like dispatcher and delegator to call directly security.hasPermission()
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822908 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9833)
I just thought that for security it's best to have both the source and
target server using the use-external-server property.
Also default to N when requesting this property
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822882 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-1032)
This changes the label for more clarity. Actually there is not only inserts but
no replacements. Because you can also create and delete. This has been defined
after this label was created with OFBIZ-4949. So we have EntitySaxReader Action
enum and it's used in this this context.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822383 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-1032)
Karl:
Avoids rollback on create error to be able to store the entity instead
(previous mostly-inserts feature).
Matin:
I think, the data load with "mostly inserts" activated should fail on a
create-failure (what it does indeed already), so I see no need for a working
solution of a fallback store attempt. Consistently the Feature should be renamed
in the frontend from "mostly inserts" to "only inserts".
Kyra:
Additional trivial refactoring in the patch: I reduced the full qualified
classname of org.xml.sax.SAXException in method signatures to the simple name.
This incorperates the changes that Martin has mentioned above.
The unnecessary call to store() is removed, simplifying the process of creating
and deleting entities. (These changes were already in Martins old patch but had
the wrong format.) This means that the flag "mostly Inserts?" is not accurately
worded since as long as there is only create fail, all operations are rolled
back. So the second patch renames the flag and all appropriate parameters to
"onlyInserts".
jleroux: I made few no functional changes, apart not swallowing an exception
Thanks: Thanks Karl for the 1st patch, Martin to get further, and Kyra to
complete the whole with a final touch and help to quickly test
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822310 13f79535-47bb-0310-9956-ffa450edef68
workeffort component
(OFBIZ-10122)
Steps to regenerate:
1) Open URL https://demo-trunk.ofbiz.apache.org/sfa/control/Events
2) Click on the event created.
3) To add the requirements of events, click on the "Requirements" button.
4) Add the existing requirement Id or add a new requirement. Click on Save.
Actual: Not able to add the requirement. Broken screen with the error message.
Note: Refer the screenshot attached.
Thanks: Rubia Elza Joshep for report and Yogesh Naroliya for the patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821613 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9169)
In OFBIZ-5409 a prefix was added for GET ajax requests.
It would be beneficial if the prefix could be configured instead of hard coded
jleroux: at r1777942 I missed the general.properties change
Thanks: Michael Brohl for reporting the issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821386 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-6946)
Currently there are dependencies in the order component on the ecommerce
component. Order management should work without the ecommerce component.
jleroux: I simply removed the commented out lines, no need for a patch
There are still a lot of other dependencies in the order component on the
ecommerce component...
Thanks: Pierre for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821356 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10113)
I found this error in trunk demo error.log
2018-01-16 15:45:48,684 |jsse-nio-8443-exec-3 |FreeMarkerWorker |E| null
freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> userLogin [in template
"component://common-theme/template/includes/SetMultipleSelectJs.ftl" at line 32, column 20]
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${userLogin.lastLocale!"en"} [in template
"component://common-theme/template/includes/SetMultipleSelectJs.ftl" at line 32, column 18]
----
This fixes it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821268 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10167)
As reported by Deepak on dev ML the returned name should be a parameter and not
enforced to "Authorisation"
This removes a wrong comment (no functional change)
Thanks: Deepak for bug report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821230 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9708)
In WorkEffortSimpleServices.xml the service implementations from
updateWorkEffortContactMech to updateWorkEffortEmailAddress are missing service
definitions.
This was discussed at http://markmail.org/message/kgbpolz2daxfa5zx.
Thanks to Pawan Verma for reporting and patching, everyone for the discussion
and Scott for the detailed argumentation which makes totally sense.
jleroux:I wanted to provide proper tests, but this has already stayed too long
in my working copy
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821114 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10133)
No functional change in trunk
Slightly improves formatting in streamContent() in trunk.
Uses the same code in R16, notably for setting
byte[] buffer = new byte[bufferSize];
that guarantee no issues, and using try-with-ressource
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821054 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10133)
When ofbiz streams a large content (eg. video file), get out of memory exception.
To reproduce the issue see the Jira
jleroux: I just removed final for bufferSize, I see no needs for that local
variable
Thanks: Wai for the patch Michael for the discussion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821036 13f79535-47bb-0310-9956-ffa450edef68