Author: jleroux
Date: Fri Mar 22 10:31:09 2013
New Revision: 1459698
URL:
http://svn.apache.org/r1459698Log:
"Applied fix from trunk for revision: 1459220"
------------------------------------------------------------------------
r1459220 | mor | 2013-03-21 11:38:28 +0100 (jeu., 21 mars 2013) | 1 line
Slightly different patch to fix the auto save cart functionality for anonymous user reported by Mirko on OFBIZ-5157.
------------------------------------------------------------------------
Modified:
ofbiz/branches/release12.04/ (props changed)
ofbiz/branches/release12.04/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml
Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1459220
Modified: ofbiz/branches/release12.04/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml?rev=1459698&r1=1459697&r2=1459698&view=diff==============================================================================
--- ofbiz/branches/release12.04/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml (original)
+++ ofbiz/branches/release12.04/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml Fri Mar 22 10:31:09 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>