From bb2c86b50e9b4ea69c94f76d75cc09dfdaaab10c Mon Sep 17 00:00:00 2001 From: "David E. Jones" Date: Thu, 2 Aug 2007 23:37:27 +0000 Subject: [PATCH] Changed to always use the system user, bad if it tries to use the customer which is what would happen on an eca trigger git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@562290 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/ofbiz/oagis/OagisShipmentServices.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java b/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java index ea905914c9..1f9bf0f37a 100644 --- a/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java +++ b/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java @@ -299,7 +299,6 @@ public class OagisShipmentServices { GenericDelegator delegator = ctx.getDelegator(); String orderId = (String) context.get("orderId"); String shipmentId = (String) context.get("shipmentId"); - GenericValue userLogin = (GenericValue) context.get("userLogin"); String sendToUrl = (String) context.get("sendToUrl"); String saveToFilename = (String) context.get("saveToFilename"); @@ -308,12 +307,13 @@ public class OagisShipmentServices { Map result = ServiceUtil.returnSuccess(); MapStack bodyParameters = MapStack.create(); - if (userLogin == null) { - try { - userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system")); - } catch (GenericEntityException e) { - Debug.logError(e, "Error getting userLogin", module); - } + + // the userLogin passed in will usually be the customer, so don't use it; use the system user instead + GenericValue userLogin = null; + try { + userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system")); + } catch (GenericEntityException e) { + Debug.logError(e, "Error getting userLogin", module); } // check payment authorization