ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Crum <adri...@hlmksw.com>
Subject Re: svn commit: r611330 - in /ofbiz/trunk/applications/party: script/org/ofbiz/party/communication/CommunicationEventServices.xml script/org/ofbiz/party/party/PartyPermissionServices.xml servicedef/services.xml
Date Sat, 12 Jan 2008 00:01:49 GMT
Jacques,

This commit doesn't perform the same permission check. Maybe it would be better to copy the

permission checking code from createCommunicationEvent into partyCommunicationEventPermissionCheck.

-Adrian

jleroux@apache.org wrote:

> Author: jleroux
> Date: Fri Jan 11 15:27:10 2008
> New Revision: 611330
> 
> URL: http://svn.apache.org/viewvc?rev=611330&view=rev
> Log:
> Finally complete commits 611236 and 611257 with Adrian's help : https://issues.apache.org/jira/browse/OFBIZ-1563?focusedCommentId=12558149#action_12558149
> OFBIZ-1563
> 
> Modified:
>     ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
>     ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyPermissionServices.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=611330&r1=611329&r2=611330&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 15:27:10 2008
> @@ -21,19 +21,6 @@
>  <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"/>     
> 
> 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=611330&r1=611329&r2=611330&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 15:27:10 2008
> @@ -226,7 +226,11 @@
>          </if-compare>
>      </simple-method>
>      <simple-method method-name="partyCommunicationEventPermissionCheck" short-description="Communication
Event permission logic">
> -        <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="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>        
>      </simple-method>
>  </simple-methods>
> 
> Modified: ofbiz/trunk/applications/party/servicedef/services.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=611330&r1=611329&r2=611330&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/servicedef/services.xml (original)
> +++ ofbiz/trunk/applications/party/servicedef/services.xml Fri Jan 11 15:27:10 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"/--><!-- allowed for him/herself see implementation -->
> +        <permission-service service-name="partyCommunicationEventPermissionCheck"
main-action="CREATE"/>
>          <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"/>
> 
> 
> 


Mime
View raw message