svn commit: r611345 - /ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyPermissionServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r611345 - /ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyPermissionServices.xml

adrianc
Author: adrianc
Date: Fri Jan 11 17:37:41 2008
New Revision: 611345

URL: http://svn.apache.org/viewvc?rev=611345&view=rev
Log:
One last fixup for party communication event permission checking.

Modified:
    ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyPermissionServices.xml

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyPermissionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyPermissionServices.xml?rev=611345&r1=611344&r2=611345&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyPermissionServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyPermissionServices.xml Fri Jan 11 17:37:41 2008
@@ -225,6 +225,9 @@
             <field-to-result field-name="failMessage"/>
         </if-compare>
     </simple-method>
+
+    <!-- Returns hasPermission=true if userLogin partyId equals partyIdFrom parameter OR
+         partyIdTo parameter OR user has one of the base PARTYMGR or PARTYMGR_CME CRUD+ADMIN permissions -->
     <simple-method method-name="partyCommunicationEventPermissionCheck" short-description="Communication Event permission logic">
         <if>
             <condition>
@@ -234,9 +237,13 @@
                 </and>
             </condition>
             <then>
-                <set field="primaryPermission" value="PARTYMGR_CME"/>
-                <call-simple-method method-name="genericBasePermissionCheck" xml-resource="component://common/script/org/ofbiz/common/permission/CommonPermissionServices.xml"/>
+                <set field="hasPermission" type="Boolean" value="true"/>
+                <field-to-result field-name="hasPermission"/>
             </then>
+            <else>
+                <set field="altPermission" value="PARTYMGR_CME"/>
+                <call-simple-method method-name="basePermissionCheck"/>
+            </else>
         </if>
     </simple-method>
 </simple-methods>