This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 141af575ae Fixed: checkContentOperationSecurity crashes when content
has a purpose assigned (OFBIZ-13535)
141af575ae is described below
commit 141af575ae85154a05d192f283b6bc8641ad93f0
Author: Mridul Pathak <[email protected]>
AuthorDate: Mon Sep 7 16:36:23 2026 +0530
Fixed: checkContentOperationSecurity crashes when content has a purpose
assigned (OFBIZ-13535)
- Fixed operations << currentOperations nesting a sub-list instead of
flattening it, which made the operations loop crash with
MissingPropertyException on any content with a ContentPurpose assigned
- Fixed findAllContentPurposes's declared return type (Map, should never
have been narrowed from def) crashing with GroovyCastException for the same
trigger condition, earlier in the same call chain, before the bug above could
even be reached
---
.../apache/ofbiz/content/permission/ContentPermissionServices.groovy | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/applications/content/src/main/groovy/org/apache/ofbiz/content/permission/ContentPermissionServices.groovy
b/applications/content/src/main/groovy/org/apache/ofbiz/content/permission/ContentPermissionServices.groovy
index d0d710ab80..6934bd65aa 100644
---
a/applications/content/src/main/groovy/org/apache/ofbiz/content/permission/ContentPermissionServices.groovy
+++
b/applications/content/src/main/groovy/org/apache/ofbiz/content/permission/ContentPermissionServices.groovy
@@ -353,7 +353,7 @@ Map checkContentOperationSecurity(String
contentOperationId, String contentPurpo
.orderBy('contentPurposeTypeId')
.cache()
.queryList()
- operations << currentOperations
+ operations.addAll(currentOperations)
}
} else {
operations = from('ContentPurposeOperation')
@@ -531,7 +531,7 @@ Map checkRoleSecurity(String roleEntity, String
roleEntityField, String checkId,
/**
* Find all content purposes for the specified content
*/
-Map findAllContentPurposes(String checkId) {
+Object findAllContentPurposes(String checkId) {
if (!checkId) {
return error(label('ContentUiLabels', 'ContentRequiredField',
[requiredField: 'checkId']))
}