Author: jleroux
Date: Fri Jan 11 16:39:28 2008
New Revision: 611337
URL:
http://svn.apache.org/viewvc?rev=611337&view=revLog:
Finally to close commits 611236,611257 and 611330 I put the permission checking code from createCommunicationEvent into partyCommunicationEventPermissionCheck
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=611337&r1=611336&r2=611337&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 16:39:28 2008
@@ -226,11 +226,17 @@
</if-compare>
</simple-method>
<simple-method method-name="partyCommunicationEventPermissionCheck" short-description="Communication Event permission logic">
- <set field="hasPermission" type="Boolean" value="false"/>
- <call-simple-method method-name="partyIdPermissionCheck"/>
- <if-compare field-name="hasPermission" operator="not-equals" value="true">
- <set field="primaryPermission" value="PARTYMGR_CME"/>
- <call-simple-method method-name="genericBasePermissionCheck" xml-resource="component://common/script/org/ofbiz/common/permission/CommonPermissionServices.xml"/>
- </if-compare>
+ <if>
+ <condition>
+ <and>
+ <if-compare-field field-name="parameters.partyIdFrom" operator="not-equals" to-field-name="userLogin.partyId"/>
+ <if-compare-field field-name="parameters.partyIdTo" operator="not-equals" to-field-name="userLogin.partyId"/>
+ </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"/>
+ </then>
+ </if>
</simple-method>
</simple-methods>