Author: jacopoc Date: Mon Sep 11 23:07:08 2006 New Revision: 442471 URL: http://svn.apache.org/viewvc?view=rev&rev=442471 Log: Automatic requirement creation services (triggered by eca) are now executed using the "system" account to avoid auth error when executed by ecommerce users. This will close OFBIZ-217.
Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml incubator/ofbiz/trunk/applications/order/servicedef/secas.xml Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml?view=diff&rev=442471&r1=442470&r2=442471 ============================================================================== --- incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original) +++ incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml Mon Sep 11 23:07:08 2006 @@ -260,12 +260,10 @@ </simple-method> <simple-method method-name="createRequirementFromItemATP" short-description="Create a Requirement for an item based on ATP inventory quantity and minimum"> - <!-- this permission check breaks the checkout process in ecommerce; to tighten security could do this if the logged in user is not associated with the order in an OrderRole, then it would behave like other things in ecommerce <check-permission permission="ORDERMGR" action="_CREATE"> <fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunCreateRequirementFromItemATP"/> </check-permission> <check-errors/> - --> <!-- assumes that inventoryItemId is one of the parameters and get the inventory item of the reservation --> <entity-one entity-name="InventoryItem" value-name="inventoryItem" auto-field-map="true"/> Modified: incubator/ofbiz/trunk/applications/order/servicedef/secas.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/servicedef/secas.xml?view=diff&rev=442471&r1=442470&r2=442471 ============================================================================== --- incubator/ofbiz/trunk/applications/order/servicedef/secas.xml (original) +++ incubator/ofbiz/trunk/applications/order/servicedef/secas.xml Mon Sep 11 23:07:08 2006 @@ -239,15 +239,15 @@ <!-- Requirement / stock level --> <eca service="createItemIssuance" event="invoke"> <condition field-name="quantity" value="0" operator="greater" type="Double"/> - <action service="checkCreateStockRequirement" mode="sync"/> + <action service="checkCreateStockRequirement" mode="sync" runAsUser="system"/> </eca> <eca service="updateItemIssuance" event="invoke"> <condition field-name="quantity" value="0" operator="greater" type="Double"/> - <action service="checkCreateStockRequirement" mode="sync"/> + <action service="checkCreateStockRequirement" mode="sync" runAsUser="system"/> </eca> <eca service="reserveOrderItemInventory" event="commit"> <condition field-name="quantity" value="0" operator="greater" type="Double"/> - <action service="createRequirementFromItemATP" mode="sync"/> + <action service="createRequirementFromItemATP" mode="sync" runAsUser="system"/> </eca> <!-- WorkEffort --> <eca service="createQuoteWorkEffort" event="invoke">