Author: mor
Date: Sat Nov 28 12:12:56 2009
New Revision: 885087

URL: http://svn.apache.org/viewvc?rev=885087&view=rev
Log:
Replaced the permission required to update/delete a contact mech for Facility 
with correct permission. Also added permission check to create a facility 
contact mech.

Modified:
    
ofbiz/trunk/applications/product/webapp/facility/facility/ViewContactMechs.ftl
    ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml

Modified: 
ofbiz/trunk/applications/product/webapp/facility/facility/ViewContactMechs.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/ViewContactMechs.ftl?rev=885087&r1=885086&r2=885087&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/webapp/facility/facility/ViewContactMechs.ftl 
(original)
+++ 
ofbiz/trunk/applications/product/webapp/facility/facility/ViewContactMechs.ftl 
Sat Nov 28 12:12:56 2009
@@ -90,10 +90,10 @@
             </td>
             <td class="button-col">
               &nbsp;
-              <#if security.hasEntityPermission("PARTYMGR", "_UPDATE", 
session)>
+              <#if security.hasEntityPermission("FACILITY", "_UPDATE", 
session)>
                 <a 
href='<@ofbizUrl>EditContactMech?facilityId=${facilityId}&contactMechId=${contactMech.contactMechId}</@ofbizUrl>'>${uiLabelMap.CommonUpdate}</a>
               </#if>
-              <#if security.hasEntityPermission("PARTYMGR", "_DELETE", 
session)>
+              <#if security.hasEntityPermission("FACILITY", "_DELETE", 
session)>
                 <form 
action="<@ofbizUrl>deleteContactMech/ViewContactMechs</@ofbizUrl>" 
name="deleteContactForm_${contactMechMap_index}" method="post">
                   <input type="hidden" name="facilityId" 
value="${facilityId?if_exists}"/>
                   <input type="hidden" name="contactMechId" 
value="${contactMech.contactMechId?if_exists}"/>

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=885087&r1=885086&r2=885087&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml 
(original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Sat 
Nov 28 12:12:56 2009
@@ -799,9 +799,16 @@
                                         <parameter param-name="facilityId"/>
                                         <parameter 
param-name="externalLoginKey"/>
                                     </link>
-                                    <link target="EditContactMech" 
text="${uiLabelMap.ProductNewContactMech}" style="buttontext">
-                                        <parameter param-name="facilityId"/>
-                                    </link>
+                                    <section>
+                                        <condition>
+                                            <if-service-permission 
service-name="facilityGenericPermission" main-action="CREATE"/>
+                                        </condition>
+                                        <widgets>
+                                            <link target="EditContactMech" 
text="${uiLabelMap.ProductNewContactMech}" style="buttontext">
+                                                <parameter 
param-name="facilityId"/>
+                                            </link>
+                                        </widgets>
+                                    </section>
                                 </widgets>
                             </section>
                         </container>


Reply via email to