Author: jleroux
Date: Fri Jan 11 10:42:51 2008 New Revision: 611257 URL: http://svn.apache.org/viewvc?rev=611257&view=rev Log: Revert a change from my previous commit 611236 <<A patch from Abhijit Meshram "Re-Factor Party CommunicationEvent permissions to follow new patterns." (https://issues.apache.org/jira/browse/OFBIZ-1563) - OFBIZ-1563>> Since in this particular case creation is allowed for him/herself, see implementation. I don't know if there is a better way (generalised) to deal with such cases so for now I simply revert. Please advice if a better solution exists, thanks Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml ofbiz/trunk/applications/party/servicedef/services.xml Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=611257&r1=611256&r2=611257&view=diff ============================================================================== --- ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original) +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Fri Jan 11 10:42:51 2008 @@ -21,7 +21,20 @@ <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="createCommunicationEvent" short-description="Create a CommunicationEvent"> - + <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> + <check-permission permission="PARTYMGR" action="_CME_CREATE"> + <fail-property resource="PartyUiLabels" property="PartyCreateCommunicationEventPermissionError"/> + </check-permission> + </then> + </if> + <if-empty field-name="parameters.statusId"> <set value="COM_ENTERED" field="parameters.statusId"/> </if-empty> Modified: ofbiz/trunk/applications/party/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=611257&r1=611256&r2=611257&view=diff ============================================================================== --- ofbiz/trunk/applications/party/servicedef/services.xml (original) +++ ofbiz/trunk/applications/party/servicedef/services.xml Fri Jan 11 10:42:51 2008 @@ -633,7 +633,7 @@ <service name="createCommunicationEvent" engine="simple" location="org/ofbiz/party/communication/CommunicationEventServices.xml" invoke="createCommunicationEvent" auth="true"> <description>Create a Communication Event</description> - <permission-service service-name="partyCommunicationEventPermissionCheck" main-action="CREATE"/> + <!-- permission-service service-name="partyCommunicationEventPermissionCheck" main-action="CREATE"/--><!-- allowed for him/herself see implementation --> <auto-attributes entity-name="CommunicationEvent" include="nonpk" mode="IN" optional="true"/> <auto-attributes entity-name="CommunicationEvent" include="pk" mode="INOUT" optional="true"/> <attribute name="productId" type="String" mode="IN" optional="true"/> |
Free forum by Nabble | Edit this page |