This is an automated email from the ASF dual-hosted git repository. mridulpathak pushed a commit to branch release24.09 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit aceaba654a07f37c5d33206d51dcf344bb54842b Author: Mridul Pathak <[email protected]> AuthorDate: Thu Oct 22 22:27:35 2026 +0530 Adapt orderInventoryPermissionCheck to release24.09's Groovy helpers release24.09's GroovyBaseScript doesn't have the require() helper or the failure(resource, property) overload used on trunk; rewritten using the same error()/success()/failure(message) style already used by the sibling facilityGenericPermission in this file. --- .../ofbiz/product/product/inventory/InventoryServicesScript.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryServicesScript.groovy b/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryServicesScript.groovy index ebe12f0de9..aca105414a 100644 --- a/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryServicesScript.groovy +++ b/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryServicesScript.groovy @@ -75,11 +75,14 @@ Map facilityGenericPermission() { */ Map orderInventoryPermissionCheck() { String mainAction = parameters.mainAction - require(mainAction as boolean, 'ProductUiLabels', 'ProductMissingMainActionInPermissionService') + if (!mainAction) { + return error(UtilProperties.getMessage('ProductUiLabels', 'ProductMissingMainActionInPermissionService', parameters.locale)) + } Map result = success() result.hasPermission = security.hasEntityPermission('ORDERMGR', "_${mainAction}", parameters.userLogin) if (!result.hasPermission) { - result = failure('ProductUiLabels', 'ProductPermissionError') + result = failure(UtilProperties.getMessage('ProductUiLabels', 'ProductPermissionError', parameters.locale)) + result.hasPermission = false } return result }

