Author: mor
Date: Thu Mar 21 10:38:28 2013
New Revision: 1459220

URL: http://svn.apache.org/r1459220
Log:
Slightly different patch to fix the auto save cart functionality for anonymous 
user reported by Mirko on OFBIZ-5157.

Modified:
    
ofbiz/trunk/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml

Modified: 
ofbiz/trunk/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml?rev=1459220&r1=1459219&r2=1459220&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml
 (original)
+++ 
ofbiz/trunk/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml
 Thu Mar 21 10:38:28 2013
@@ -121,7 +121,19 @@ under the License.
         <if-empty field="shoppingListItems">
             <set field="parentMethodName" value="createShoppingListItem"/>
             <set field="permissionAction" value="CREATE"/>
-            <call-simple-method method-name="checkShoppingListItemSecurity"/>
+            <entity-one entity-name="ShoppingList" value-field="shoppingList"/>
+            <if>
+                <condition>
+                    <and>
+                        <not><if-empty field="shoppingList.partyId"/></not>
+                        <not><if-compare-field field="userLogin.partyId" 
to-field="shoppingList.partyId" operator="equals"/></not>
+                        <not><if-has-permission permission="PARTYMGR" 
action="_${permissionAction}"/></not>
+                    </and>
+                </condition>
+                <then>
+                    <add-error><fail-property resource="OrderErrorUiLabels" 
property="OrderSecurityErrorToRunForAnotherParty"/></add-error>
+                </then>
+            </if>
             <check-errors/>
 
             <entity-one entity-name="ShoppingList" value-field="shoppingList"/>
@@ -288,7 +300,6 @@ under the License.
         <if>
             <condition>
                 <and>
-                    <not><if-empty field="shoppingList.partyId"/></not>
                     <not><if-compare-field field="userLogin.partyId" 
to-field="shoppingList.partyId" operator="equals"/></not>
                     <not><if-has-permission permission="PARTYMGR" 
action="_${permissionAction}"/></not>
                 </and>


Reply via email to