Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Slightly different patch to fix the auto save cart functionality for …

…anonymous user reported by Mirko on OFBIZ-5157.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1459220 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit defe51b0c358ff5d8b4d3d8eb85aab1759ab0777 1 parent ff69b1e
Vikas Mayur authored
View
15 applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.