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
This commit is contained in:
David E. Jones
2007-08-02 23:37:27 +00:00
parent dd0e4dcd67
commit bb2c86b50e
@@ -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