You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mo...@apache.org on 2011/07/15 14:58:39 UTC

svn commit: r1147135 - in /ofbiz/trunk/applications/order: script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml servicedef/services_shoppinglist.xml

Author: mor
Date: Fri Jul 15 12:58:38 2011
New Revision: 1147135

URL: http://svn.apache.org/viewvc?rev=1147135&view=rev
Log:
Modified the shopping list services so that they also support anonymous users.

Modified:
    ofbiz/trunk/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml
    ofbiz/trunk/applications/order/servicedef/services_shoppinglist.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=1147135&r1=1147134&r2=1147135&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 Fri Jul 15 12:58:38 2011
@@ -20,10 +20,12 @@ under the License.
 
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
-    <simple-method method-name="createShoppingList" short-description="Create a ShoppingList">
+    <simple-method method-name="createShoppingList" short-description="Create a ShoppingList" login-required="false">
         <if>
             <condition>
                   <and>
+                    <not><if-empty field="userLogin"/></not>
+                    <not><if-compare field="userLogin.userLoginId" operator="equals" value="anonymous"/></not>
                     <not><if-empty field="parameters.partyId"/></not>
                     <not><if-compare-field to-field="userLogin.partyId" field="parameters.partyId" operator="equals"/></not>
                     <not><if-has-permission permission="PARTYMGR" action="_CREATE"/></not>
@@ -111,7 +113,7 @@ under the License.
         <remove-value value-field="shoppingList"/>
     </simple-method>
 
-    <simple-method method-name="createShoppingListItem" short-description="Create a ShoppingList Item">
+    <simple-method method-name="createShoppingListItem" short-description="Create a ShoppingList Item" login-required="false">
         <entity-and list="shoppingListItems" entity-name="ShoppingListItem">
             <field-map field-name="productId" from-field="parameters.productId"></field-map>
             <field-map field-name="shoppingListId" from-field="parameters.shoppingListId"></field-map>
@@ -155,7 +157,7 @@ under the License.
         </if-empty>
     </simple-method>
 
-    <simple-method method-name="updateShoppingListItem" short-description="Update a ShoppingListItem">
+    <simple-method method-name="updateShoppingListItem" short-description="Update a ShoppingListItem" login-required="false">
         <set field="parentMethodName" value="updateShoppingListItem"/>
         <set field="permissionAction" value="UPDATE"/>
         <call-simple-method method-name="checkShoppingListItemSecurity"/>
@@ -286,6 +288,7 @@ 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>

Modified: ofbiz/trunk/applications/order/servicedef/services_shoppinglist.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services_shoppinglist.xml?rev=1147135&r1=1147134&r2=1147135&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services_shoppinglist.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services_shoppinglist.xml Fri Jul 15 12:58:38 2011
@@ -30,7 +30,7 @@ under the License.
         <auto-attributes mode="IN" entity-name="ShoppingList" include="nonpk" optional="true"/>
         <attribute name="shippingMethodString" type="String" mode="IN" optional="true"/>
     </service>
-    <service name="createShoppingList" engine="simple" auth="true"
+    <service name="createShoppingList" engine="simple" auth="false"
             location="component://order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml" invoke="createShoppingList">
         <description>Create a shopping list entity</description>
         <implements service="createShoppingListRecurrence"/>
@@ -108,7 +108,7 @@ under the License.
         <attribute name="quantityPurchased" type="BigDecimal" mode="IN" optional="true"/>
         <attribute name="configId" type="String" mode="IN" optional="true"/>
     </service>
-    <service name="createShoppingListItem" engine="simple" auth="true"
+    <service name="createShoppingListItem" engine="simple" auth="false"
             location="component://order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml" invoke="createShoppingListItem">
         <description>Create a shopping list item</description>
         <implements service="shoppingListItemInterface"/>
@@ -117,7 +117,7 @@ under the License.
         <attribute name="productId" type="String" mode="IN" optional="false"/>
         <attribute name="shoppingListItemSeqId" type="String" mode="OUT" optional="false"/>
     </service>
-    <service name="updateShoppingListItem" engine="simple" auth="true"
+    <service name="updateShoppingListItem" engine="simple" auth="false"
             location="component://order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml" invoke="updateShoppingListItem">
         <description>Update a shopping list item</description>
         <implements service="shoppingListItemInterface"/>