svn commit: r1768188 [2/2] - in /ofbiz/trunk: applications/accounting/minilang/payment/ applications/accounting/minilang/rate/ applications/accounting/servicedef/ applications/content/minilang/compdoc/ applications/content/minilang/content/ application...

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

svn commit: r1768188 [2/2] - in /ofbiz/trunk: applications/accounting/minilang/payment/ applications/accounting/minilang/rate/ applications/accounting/servicedef/ applications/content/minilang/compdoc/ applications/content/minilang/content/ application...

Deepak Dixit-5
Modified: ofbiz/trunk/applications/product/servicedef/services_facility.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_facility.xml?rev=1768188&r1=1768187&r2=1768188&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_facility.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_facility.xml Sat Nov  5 11:10:57 2016
@@ -615,6 +615,7 @@ under the License.
     <service name="createFacilityContactMech" engine="simple" debug="true"
             location="component://product/minilang/product/storage/FacilityContactMechServices.xml" invoke="createFacilityContactMech" auth="true">
         <description>Create a FacilityContactMech</description>
+        <permission-service service-name="facilityManagerPermission" main-action="CREATE"/>
         <auto-attributes entity-name="ContactMech" include="nonpk" mode="IN" optional="true"/>
         <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
         <attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="true"/>
@@ -623,6 +624,7 @@ under the License.
     <service name="updateFacilityContactMech" engine="simple"
             location="component://product/minilang/product/storage/FacilityContactMechServices.xml" invoke="updateFacilityContactMech" auth="true">
         <description>Update a FacilityContactMech</description>
+        <permission-service service-name="facilityManagerPermission" main-action="UPDATE"/>
         <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
         <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/>
         <attribute name="contactMechTypeId" type="String" mode="IN" optional="false"/>
@@ -632,12 +634,14 @@ under the License.
     <service name="deleteFacilityContactMech" engine="simple"
             location="component://product/minilang/product/storage/FacilityContactMechServices.xml" invoke="deleteFacilityContactMech" auth="true">
         <description>Delete a FacilityContactMech</description>
+        <permission-service service-name="facilityManagerPermission" main-action="DELETE"/>
         <attribute name="facilityId" type="String" mode="IN" optional="false"/>
         <attribute name="contactMechId" type="String" mode="IN" optional="false"/>
     </service>
     <service name="createFacilityPostalAddress" engine="simple"
             location="component://product/minilang/product/storage/FacilityContactMechServices.xml" invoke="createFacilityPostalAddress" auth="true">
         <description>Create a Postal Address</description>
+        <permission-service service-name="facilityManagerPermission" main-action="CREATE"/>
         <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
         <auto-attributes entity-name="PostalAddress" include="nonpk" mode="IN" optional="true"/>
         <attribute name="paymentMethodId" type="String" mode="IN" optional="true"/>
@@ -650,6 +654,7 @@ under the License.
     <service name="updateFacilityPostalAddress" engine="simple"
             location="component://product/minilang/product/storage/FacilityContactMechServices.xml" invoke="updateFacilityPostalAddress" auth="true">
         <description>Update a Postal Address</description>
+        <permission-service service-name="facilityManagerPermission" main-action="UPDATE"/>
         <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
         <auto-attributes entity-name="PostalAddress" include="nonpk" mode="IN" optional="true"/>
         <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/>
@@ -658,6 +663,7 @@ under the License.
     <service name="createFacilityTelecomNumber" engine="simple"
             location="component://product/minilang/product/storage/FacilityContactMechServices.xml" invoke="createFacilityTelecomNumber" auth="true">
         <description>Create a Telecommunications Number</description>
+        <permission-service service-name="facilityManagerPermission" main-action="CREATE"/>
         <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
         <auto-attributes entity-name="TelecomNumber" include="nonpk" mode="IN" optional="true"/>
         <attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="true"/>
@@ -666,6 +672,7 @@ under the License.
     <service name="updateFacilityTelecomNumber" engine="simple"
             location="component://product/minilang/product/storage/FacilityContactMechServices.xml" invoke="updateFacilityTelecomNumber" auth="true">
         <description>Update a Telecommunications Number</description>
+        <permission-service service-name="facilityManagerPermission" main-action="UPDATE"/>
         <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
         <auto-attributes entity-name="TelecomNumber" include="nonpk" mode="IN" optional="true"/>
         <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/>
@@ -673,6 +680,7 @@ under the License.
     <service name="createFacilityEmailAddress" engine="simple"
             location="component://product/minilang/product/storage/FacilityContactMechServices.xml" invoke="createFacilityEmailAddress" auth="true">
         <description>Create an Email Address</description>
+        <permission-service service-name="facilityManagerPermission" main-action="UPDATE"/>
         <auto-attributes entity-name="ContactMech" include="nonpk" mode="IN" optional="true"/>
         <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
         <attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="true"/>
@@ -682,6 +690,7 @@ under the License.
     <service name="updateFacilityEmailAddress" engine="simple"
             location="component://product/minilang/product/storage/FacilityContactMechServices.xml" invoke="updateFacilityEmailAddress" auth="true">
         <description>Update an Email Address</description>
+        <permission-service service-name="facilityManagerPermission" main-action="UPDATE"/>
         <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
         <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/>
         <attribute name="emailAddress" type="String" mode="IN" optional="false"/>
@@ -690,6 +699,7 @@ under the License.
     <service name="createFacilityContactMechPurpose" engine="simple"
             location="component://product/minilang/product/storage/FacilityContactMechServices.xml" invoke="createFacilityContactMechPurpose">
         <description>Create a purpose for facility contact mech</description>
+        <permission-service service-name="facilityManagerPermission" main-action="CREATE"/>
         <auto-attributes entity-name="FacilityContactMechPurpose" include="pk" mode="IN" optional="false">
             <exclude field-name="fromDate"/>
         </auto-attributes>
@@ -698,6 +708,7 @@ under the License.
     <service name="deleteFacilityContactMechPurpose" engine="simple"
             location="component://product/minilang/product/storage/FacilityContactMechServices.xml" invoke="deleteFacilityContactMechPurpose">
         <description>Delete a purpose for facility contact mech</description>
+        <permission-service service-name="facilityManagerPermission" main-action="DELETE"/>
         <auto-attributes entity-name="FacilityContactMechPurpose" include="pk" mode="IN" optional="false"/>
     </service>
 <!-- end cm -->
@@ -798,6 +809,7 @@ under the License.
             sufficient availableToPromise to move the stock, in fact it is generally triggered because
             some promised inventory is in a bulk location and needs to be moved to a pick location.
         </description>
+        <permission-service service-name="facilityManagerPermission" main-action="VIEW"/>
         <attribute name="facilityId" type="String" mode="IN" optional="false"/>
         <attribute name="moveByOisgirInfoList" type="List" mode="OUT" optional="true"/>
         <attribute name="stockMoveHandled" type="Map" mode="OUT" optional="true"/>
@@ -808,6 +820,7 @@ under the License.
         <description>
             Find all Stock Moves that should be done based on minimum quantities on each Pick/Primary ProductFacilityLocation.
         </description>
+        <permission-service service-name="facilityManagerPermission" main-action="VIEW"/>
         <attribute name="facilityId" type="String" mode="IN" optional="false"/>
         <attribute name="stockMoveHandled" type="Map" mode="IN" optional="true"/>
         <attribute name="moveByPflInfoList" type="List" mode="OUT" optional="true"/>

Added: ofbiz/trunk/applications/product/servicedef/services_perm.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_perm.xml?rev=1768188&view=auto
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_perm.xml (added)
+++ ofbiz/trunk/applications/product/servicedef/services_perm.xml Sat Nov  5 11:10:57 2016
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
+    <vendor>OFBiz</vendor>
+    <version>1.0</version>
+
+    <service name="facilityManagerPermission" engine="simple"
+            location="component://product/minilang/permission/PermissionServices.xml" invoke="facilityManagerPermission">
+        <description>Facility Manager permission Checking Logic</description>
+        <implements service="permissionInterface"/>
+    </service>
+</services>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/product/servicedef/services_perm.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/product/servicedef/services_perm.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/product/servicedef/services_perm.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/product/servicedef/services_picklist.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_picklist.xml?rev=1768188&r1=1768187&r2=1768188&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_picklist.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_picklist.xml Sat Nov  5 11:10:57 2016
@@ -35,6 +35,7 @@ under the License.
     <service name="findOrdersToPickMove" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="findOrdersToPickMove">
         <description>Gets Picklist Data</description>
+        <permission-service service-name="facilityManagerPermission" main-action="VIEW"/>
         <attribute name="facilityId" type="String" mode="IN" optional="false"/>
         <attribute name="shipmentMethodTypeId" type="String" mode="IN" optional="true"/>
         <attribute name="isRushOrder" type="String" mode="IN" optional="true"/>
@@ -52,6 +53,7 @@ under the License.
     <service name="createPicklistFromOrders" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="createPicklistFromOrders" transaction-timeout="600">
         <description>Create Picklist From Orders</description>
+        <permission-service service-name="facilityManagerPermission" main-action="CREATE"/>
         <attribute name="facilityId" type="String" mode="IN" optional="false"/>
         <attribute name="shipmentMethodTypeId" type="String" mode="IN" optional="true"/>
         <attribute name="maxNumberOfOrders" type="Long" mode="IN" optional="true"/>
@@ -78,6 +80,7 @@ under the License.
     <service name="getPicklistDisplayInfo" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="getPicklistDisplayInfo">
         <description>Create Picklist From Orders</description>
+        <permission-service service-name="facilityManagerPermission" main-action="VIEW"/>
         <attribute name="facilityId" type="String" mode="IN" optional="false"/>
         <attribute name="viewIndex" mode="INOUT" type="Integer" optional="true"/>
         <attribute name="viewSize" mode="INOUT" type="Integer" optional="true"/>
@@ -90,6 +93,7 @@ under the License.
     <service name="getPickAndPackReportInfo" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="getPickAndPackReportInfo">
         <description>Get Pick And Pack Report Info</description>
+        <permission-service service-name="facilityManagerPermission" main-action="VIEW"/>
         <attribute name="picklistId" type="String" mode="IN" optional="false"/>
         <attribute name="picklistInfo" type="Map" mode="OUT" optional="false"/>
         <attribute name="facilityLocationInfoList" type="List" mode="OUT" optional="true"/>
@@ -100,6 +104,7 @@ under the License.
     <service name="createPicklist" default-entity-name="Picklist" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="createPicklist" auth="true">
         <description>Create Picklist</description>
+        <permission-service service-name="facilityManagerPermission" main-action="CREATE"/>
         <auto-attributes include="pk" mode="OUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <exclude field-name="picklistDate"/>
@@ -110,6 +115,7 @@ under the License.
     <service name="updatePicklist" default-entity-name="Picklist" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="updatePicklist" auth="true">
         <description>Update Picklist</description>
+        <permission-service service-name="facilityManagerPermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <exclude field-name="picklistDate"/>
@@ -121,6 +127,7 @@ under the License.
     <service name="deletePicklist" default-entity-name="Picklist" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="deletePicklist" auth="true">
         <description>Delete Picklist</description>
+        <permission-service service-name="facilityManagerPermission" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
@@ -128,23 +135,27 @@ under the License.
     <service name="createPicklistBin" default-entity-name="PicklistBin" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="createPicklistBin" auth="true">
         <description>Create PicklistBin</description>
+        <permission-service service-name="facilityManagerPermission" main-action="CREATE"/>
         <auto-attributes include="pk" mode="OUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="false"/>
     </service>
     <service name="updatePicklistBin" default-entity-name="PicklistBin" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="updatePicklistBin" auth="true">
         <description>Update PicklistBin</description>
+        <permission-service service-name="facilityManagerPermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deletePicklistBin" default-entity-name="PicklistBin" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="deletePicklistBin" auth="true">
         <description>Delete PicklistBin</description>
+        <permission-service service-name="facilityManagerPermission" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <service name="checkPicklistBinItemStatuses" default-entity-name="PicklistBin" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="checkPicklistBinItemStatuses" auth="true">
         <description>Update Picklist based on Item Status</description>
+        <permission-service service-name="facilityManagerPermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
@@ -152,6 +163,7 @@ under the License.
     <service name="createPicklistItem" default-entity-name="PicklistItem" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="createPicklistItem" auth="true">
         <description>Create PicklistItem</description>
+        <permission-service service-name="facilityManagerPermission" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="false"/>
         <override name="itemStatusId" optional="true"/>
@@ -159,6 +171,7 @@ under the License.
     <service name="updatePicklistItem" default-entity-name="PicklistItem" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="updatePicklistItem" auth="true">
         <description>Update PicklistItem</description>
+        <permission-service service-name="facilityManagerPermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <attribute name="oldItemStatusId" type="String" mode="OUT" optional="true"/>
@@ -166,6 +179,7 @@ under the License.
     <service name="deletePicklistItem" default-entity-name="PicklistItem" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="deletePicklistItem" auth="true">
         <description>Delete PicklistItem</description>
+        <permission-service service-name="facilityManagerPermission" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <service name="editPicklistItem" default-entity-name="PicklistItem" engine="simple"
@@ -181,6 +195,7 @@ under the License.
     <service name="setPicklistItemToComplete" default-entity-name="PicklistItem" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="setPicklistItemToComplete" auth="true">
         <description>Update PicklistItem's Status to COMPLETE</description>
+        <permission-service service-name="facilityManagerPermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="false"/>
     </service>
@@ -194,6 +209,7 @@ under the License.
     <service name="createPicklistRole" default-entity-name="PicklistRole" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="createPicklistRole" auth="true">
         <description>Create PicklistRole</description>
+        <permission-service service-name="facilityManagerPermission" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <exclude field-name="createdByUserLogin"/>
@@ -204,6 +220,7 @@ under the License.
     <service name="updatePicklistRole" default-entity-name="PicklistRole" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="updatePicklistRole" auth="true">
         <description>Update PicklistRole</description>
+        <permission-service service-name="facilityManagerPermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <exclude field-name="createdByUserLogin"/>
@@ -213,6 +230,7 @@ under the License.
     <service name="deletePicklistRole" default-entity-name="PicklistRole" engine="simple"
             location="component://product/minilang/shipment/picklist/PicklistServices.xml" invoke="deletePicklistRole" auth="true">
         <description>Delete PicklistRole</description>
+        <permission-service service-name="facilityManagerPermission" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 </services>

Modified: ofbiz/trunk/applications/workeffort/minilang/timesheet/TimesheetServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/minilang/timesheet/TimesheetServices.xml?rev=1768188&r1=1768187&r2=1768188&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/minilang/timesheet/TimesheetServices.xml (original)
+++ ofbiz/trunk/applications/workeffort/minilang/timesheet/TimesheetServices.xml Sat Nov  5 11:10:57 2016
@@ -84,11 +84,6 @@ under the License.
        </iterate>
     </simple-method>
     <simple-method method-name="addTimesheetToInvoice" short-description="Add Timesheet to Invoice">
-        <check-permission permission="WORKEFFORTMGR" action="_CREATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <entity-one entity-name="Timesheet" value-field="timesheet"/>
         <get-related value-field="timesheet" relation-name="TimeEntry" list="timeEntryList"/>
 
@@ -116,10 +111,6 @@ under the License.
         <call-simple-method method-name="createTimeEntryInvoiceItemsInline"/>
     </simple-method>
     <simple-method method-name="addWorkEffortTimeToInvoice" short-description="Add Work Effort Time to Invoice">
-        <check-permission permission="WORKEFFORTMGR" action="_CREATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/>
-        </check-permission>
-        <check-errors/>
         <entity-one entity-name="WorkEffort" value-field="workEffort"/>
         <if-empty field="parameters.invoiceId">
             <set-service-fields service-name="createInvoice" map="parameters" to-map="createInvoiceMap"/>
@@ -306,21 +297,11 @@ under the License.
 
     <!-- TimesheetRole Services -->
     <simple-method method-name="createTimesheetRole" short-description="Create TimesheetRole">
-        <check-permission permission="WORKEFFORTMGR" action="_CREATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <make-value value-field="newEntity" entity-name="TimesheetRole"/>
         <set-pk-fields map="parameters" value-field="newEntity"/>
         <create-value value-field="newEntity"/>
     </simple-method>
     <simple-method method-name="deleteTimesheetRole" short-description="Delete TimesheetRole">
-        <check-permission permission="WORKEFFORTMGR" action="_DELETE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <entity-one entity-name="TimesheetRole" value-field="lookedUpValue"/>
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
@@ -394,11 +375,6 @@ under the License.
         <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="getTimeEntryRate" short-description="Get TimeEntry Rate">
-        <check-permission permission="WORKEFFORTMGR" action="_VIEW">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortViewPermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <entity-one entity-name="TimeEntry" value-field="timeEntry"/>
 
         <set-service-fields service-name="getRateAmount" map="parameters" to-map="getRate"/>

Modified: ofbiz/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml?rev=1768188&r1=1768187&r2=1768188&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml (original)
+++ ofbiz/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml Sat Nov  5 11:10:57 2016
@@ -301,10 +301,6 @@ under the License.
     </simple-method>
 
     <simple-method method-name="updateCommunicationEventWorkEff" short-description="Update a CommunicationEventWorkEff">
-        <check-permission permission="WORKEFFORTMGR" action="_UPDATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortUpdatePermissionError"/>
-        </check-permission>
-        <check-errors/>
         <!-- Find old value -->
         <make-value entity-name="CommunicationEventWorkEff" value-field="communicationEventWorkEff"/>
         <set-pk-fields value-field="communicationEventWorkEff" map="parameters"/>
@@ -320,10 +316,6 @@ under the License.
     </simple-method>
 
     <simple-method method-name="deleteCommunicationEventWorkEff" short-description="Delete a CommunicationEventWorkEff">
-        <check-permission permission="WORKEFFORTMGR" action="_DELETE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortDeletePermissionError"/>
-        </check-permission>
-        <check-errors/>
         <!-- Find old value -->
         <make-value entity-name="CommunicationEventWorkEff" value-field="communicationEventWorkEff"/>
         <set-pk-fields value-field="communicationEventWorkEff" map="parameters"/>
@@ -807,10 +799,6 @@ under the License.
     <!-- WorkEffort-FixedAsset -->
     <simple-method method-name="createWorkEffortFixedAssetStd"
             short-description="Create a WorkEffort FixedAsset Standard">
-        <check-permission permission="WORKEFFORTMGR" action="_CREATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/>
-        </check-permission>
-        <check-errors />
         <entity-one entity-name="WorkEffortFixedAssetStd" value-field="lookedUpValue"/>
         <if-not-empty field="lookedUpValue">
             <add-error>
@@ -827,29 +815,17 @@ under the License.
     </simple-method>
     <simple-method method-name="updateWorkEffortFixedAssetStd"
             short-description="Update an existing WorkEffort FixedAsset Standard">
-        <check-permission permission="WORKEFFORTMGR" action="_UPDATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortUpdatePermissionError"/>
-        </check-permission>
-        <check-errors />
         <entity-one entity-name="WorkEffortFixedAssetStd" value-field="lookedUpValue"/>
         <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
         <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="removeWorkEffortFixedAssetStd"
             short-description="Delete a WorkEffort FixedAsset Standard">
-        <check-permission permission="WORKEFFORTMGR" action="_DELETE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortDeletePermissionError"/>
-        </check-permission>
-        <check-errors />
         <entity-one entity-name="WorkEffortFixedAssetStd" value-field="lookedUpValue"/>
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="createWorkEffortFixedAssetAssign"
             short-description="Create a WorkEffort FixedAsset Assign">
-        <check-permission permission="WORKEFFORTMGR" action="_CREATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/>
-        </check-permission>
-        <check-errors />
         <entity-one entity-name="WorkEffortFixedAssetAssign" value-field="lookedUpValue"/>
         <if-not-empty field="lookedUpValue">
             <add-error>
@@ -877,30 +853,18 @@ under the License.
     </simple-method>
     <simple-method method-name="updateWorkEffortFixedAssetAssign"
             short-description="Update an existing WorkEffort FixedAsset Assign">
-        <check-permission permission="WORKEFFORTMGR" action="_UPDATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortUpdatePermissionError"/>
-        </check-permission>
-        <check-errors />
         <entity-one entity-name="WorkEffortFixedAssetAssign" value-field="lookedUpValue"/>
         <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
         <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="removeWorkEffortFixedAssetAssign"
             short-description="Remove a WorkEffort FixedAsset Assign">
-        <check-permission permission="WORKEFFORTMGR" action="_DELETE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortDeletePermissionError"/>
-        </check-permission>
-        <check-errors />
         <entity-one entity-name="WorkEffortFixedAssetAssign" value-field="lookedUpValue"/>
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
 
     <!-- Create/Update/Delete Work Effort Review-->
     <simple-method method-name="createWorkEffortReview" short-description="Create Work Effort Review">
-        <check-permission permission="WORKEFFORTMGR" action="_CREATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/>
-        </check-permission>
-        <check-errors />
         <entity-one entity-name="WorkEffortReview" value-field="lookedUpValue"/>
         <if-not-empty field="lookedUpValue">
             <add-error>
@@ -921,20 +885,12 @@ under the License.
         </if-not-empty>
     </simple-method>
     <simple-method method-name="updateWorkEffortReview" short-description="Update Work Effort Review">
-        <check-permission permission="WORKEFFORTMGR" action="_UPDATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortUpdatePermissionError"/>
-        </check-permission>
-        <check-errors />
         <entity-one entity-name="WorkEffortReview" value-field="lookedUpValue"/>
         <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
         <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteWorkEffortReview"
             short-description="Remove a WorkEffort Review">
-        <check-permission permission="WORKEFFORTMGR" action="_DELETE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortDeletePermissionError"/>
-        </check-permission>
-        <check-errors />
         <entity-one entity-name="WorkEffortReview" value-field="lookedUpValue"/>
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
@@ -956,10 +912,6 @@ under the License.
     </simple-method>
 
     <simple-method method-name="createWorkEffortKeyword" short-description="Create Work Effort Keyword">
-        <check-permission permission="WORKEFFORTMGR" action="_CREATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/>
-        </check-permission>
-        <check-errors />
         <entity-one entity-name="WorkEffortKeyword" value-field="lookedUpValue"/>
         <if-not-empty field="lookedUpValue">
             <add-error>
@@ -988,19 +940,11 @@ under the License.
 
     <simple-method method-name="deleteWorkEffortKeyword"
             short-description="Remove a WorkEffort Keyword">
-        <check-permission permission="WORKEFFORTMGR" action="_DELETE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortDeletePermissionError"/>
-        </check-permission>
-        <check-errors />
         <entity-one entity-name="WorkEffortKeyword" value-field="lookedUpValue"/>
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
 
     <simple-method method-name="createWorkEffortKeywords" short-description="Create all Work Effort Keyword">
-        <check-permission permission="WORKEFFORTMGR" action="_CREATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/>
-        </check-permission>
-        <check-errors />
         <set from-field="parameters.workEffortId" field="findWorkEffortMap.workEffortId"/>
         <find-by-primary-key entity-name="WorkEffort" map="findWorkEffortMap" value-field="workEffortInstance"/>
         <call-class-method class-name="org.apache.ofbiz.workeffort.workeffort.WorkEffortKeywordIndex" method-name="indexKeywords">
@@ -1010,10 +954,6 @@ under the License.
 
     <simple-method method-name="deleteWorkEffortKeywords"
             short-description="Remove all WorkEffort Keyword">
-        <check-permission permission="WORKEFFORTMGR" action="_DELETE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortDeletePermissionError"/>
-        </check-permission>
-        <check-errors />
         <set from-field="parameters.workEffortId" field="findWorkEffortMap.workEffortId"/>
         <find-by-primary-key entity-name="WorkEffort" map="findWorkEffortMap" value-field="workEffortInstance"/>
         <if-not-empty field="workEffortInstance.workEffortId">

Modified: ofbiz/trunk/applications/workeffort/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/servicedef/services.xml?rev=1768188&r1=1768187&r2=1768188&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/workeffort/servicedef/services.xml Sat Nov  5 11:10:57 2016
@@ -414,11 +414,13 @@ under the License.
     </service>
     <service name="updateCommunicationEventWorkEff" engine="simple" location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" invoke="updateCommunicationEventWorkEff" auth="true">
         <description>Updates CommunicationEventWorkEff</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false" entity-name="CommunicationEventWorkEff"/>
         <auto-attributes include="nonpk" mode="IN" optional="true" entity-name="CommunicationEventWorkEff"/>
     </service>
     <service name="deleteCommunicationEventWorkEff" engine="simple" location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" invoke="deleteCommunicationEventWorkEff" auth="true">
         <description>Deletes CommunicationEventWorkEff</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false" entity-name="CommunicationEventWorkEff"/>
     </service>
     <service name="createWorkEffortRequest" engine="entity-auto" default-entity-name="CustRequestWorkEffort" invoke="create" auth="true">
@@ -511,6 +513,7 @@ under the License.
             invoke="createWorkEffortFixedAssetStd">
         <description>Creates a WorkEffortFixedAssetStd entry to associate a routing task
             with a fixed asset (type)</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
@@ -519,6 +522,7 @@ under the License.
             location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml"
             invoke="updateWorkEffortFixedAssetStd">
         <description>Updates an existing WorkEffortFixedAssetStd entry</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
@@ -528,6 +532,7 @@ under the License.
             invoke="removeWorkEffortFixedAssetStd">
         <description>Removes a WorkEffortFixedAssetStd, thus removing the association between a routing task
             and a fixed asset (type)</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <service name="createWorkEffortFixedAssetAssign" engine="simple" auth="true"
@@ -536,6 +541,7 @@ under the License.
             invoke="createWorkEffortFixedAssetAssign">
         <description>Create a WorkEffortFixedAssetAssign entry to associate a fixed asset
             with a work effort (e.g. a production run task)</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="fromDate" optional="true" mode="IN"/>
@@ -545,6 +551,7 @@ under the License.
             location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml"
             invoke="updateWorkEffortFixedAssetAssign">
         <description>Update an existing WorkEffortFixedAssetAssign entry</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
@@ -554,6 +561,7 @@ under the License.
             invoke="removeWorkEffortFixedAssetAssign">
         <description>Remove a WorkEffortFixedAssign entry, which removes the association between a fixed asset
             and a work effort (e.g. a production run task)</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
@@ -606,18 +614,21 @@ under the License.
     <service name="createWorkEffortReview" default-entity-name="WorkEffortReview" engine="simple"
                 location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" invoke="createWorkEffortReview" auth="true">
         <description>Create a Work Effort Review</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateWorkEffortReview" default-entity-name="WorkEffortReview" engine="simple"
                 location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" invoke="updateWorkEffortReview" auth="true">
         <description>Update a Work Effort Review</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteWorkEffortReview" engine="simple"
                 location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" invoke="deleteWorkEffortReview" auth="true">
         <description>Remove a Work Effort Review</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="DELETE"/>
         <auto-attributes entity-name="WorkEffortReview" include="pk" mode="IN" optional="false"/>
     </service>
 
@@ -630,23 +641,27 @@ under the License.
     <service name="createWorkEffortKeyword" default-entity-name="WorkEffortKeyword" engine="simple"
                 location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" invoke="createWorkEffortKeyword" auth="true">
         <description>Create a Work Effort Keyword</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteWorkEffortKeyword" engine="simple"
                 location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" invoke="deleteWorkEffortKeyword" auth="true">
         <description>Remove a Work Effort Keyword</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="DELETE"/>
         <auto-attributes entity-name="WorkEffortKeyword" include="pk" mode="IN" optional="false"/>
     </service>
     <service name="createWorkEffortKeywords" default-entity-name="WorkEffortKeyword" engine="simple"
                 location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" invoke="createWorkEffortKeywords" auth="true">
         <description>Create a Work Effort Keyword</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteWorkEffortKeywords" engine="simple"
                 location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" invoke="deleteWorkEffortKeywords" auth="true">
         <description>Remove all Work Effort Keyword</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="DELETE"/>
         <auto-attributes entity-name="WorkEffort" include="pk" mode="IN" optional="false"/>
     </service>
 

Modified: ofbiz/trunk/applications/workeffort/servicedef/services_timesheet.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/servicedef/services_timesheet.xml?rev=1768188&r1=1768187&r2=1768188&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/servicedef/services_timesheet.xml (original)
+++ ofbiz/trunk/applications/workeffort/servicedef/services_timesheet.xml Sat Nov  5 11:10:57 2016
@@ -70,12 +70,14 @@ under the License.
     <service name="addTimesheetToInvoice" default-entity-name="Timesheet" engine="simple" auth="true"
         location="component://workeffort/minilang/timesheet/TimesheetServices.xml" invoke="addTimesheetToInvoice">
         <description>Add Timesheet to Invoice</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="CREATE"/>
         <attribute name="timesheetId" type="String" mode="IN" optional="false"/>
         <attribute name="invoiceId" type="String" mode="IN" optional="false"/>
     </service>
     <service name="addTimesheetToNewInvoice" default-entity-name="Timesheet" engine="simple" auth="true"
         location="component://workeffort/minilang/timesheet/TimesheetServices.xml" invoke="addTimesheetToInvoice">
         <description>Add Timesheet to Invoice</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="CREATE"/>
         <attribute name="timesheetId" type="String" mode="IN" optional="false"/>
         <attribute name="partyIdFrom" type="String" mode="IN" optional="false"/>
         <attribute name="partyId" type="String" mode="IN" optional="false"/>
@@ -94,6 +96,7 @@ under the License.
     <service name="addWorkEffortTimeToNewInvoice" default-entity-name="Timesheet" engine="simple" auth="true"
         location="component://workeffort/minilang/timesheet/TimesheetServices.xml" invoke="addWorkEffortTimeToInvoice">
         <description>Add WorkEffort Time to a new Invoice with the option to combine all time entries with the same rateType into one invoiceItem</description>
+        <permission-service service-name="workEffortGenericPermission" main-action="CREATE"/>
         <attribute name="workEffortId" type="String" mode="IN" optional="false"/>
         <attribute name="partyIdFrom" type="String" mode="IN" optional="false"/>
         <attribute name="partyId" type="String" mode="IN" optional="false"/>
@@ -106,12 +109,14 @@ under the License.
     <service name="createTimesheetRole" default-entity-name="TimesheetRole" engine="simple" auth="true"
         location="component://workeffort/minilang/timesheet/TimesheetServices.xml" invoke="createTimesheetRole">
         <description>Creates TimesheetRole</description>
+        <permission-service service-name="workEffortGenericPermission" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteTimesheetRole" default-entity-name="TimesheetRole" engine="simple" auth="true"
         location="component://workeffort/minilang/timesheet/TimesheetServices.xml" invoke="deleteTimesheetRole">
         <description>Deletes TimesheetRole</description>
+        <permission-service service-name="workEffortGenericPermission" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
@@ -142,6 +147,7 @@ under the License.
     <service name="getTimeEntryRate" default-entity-name="TimeEntry" engine="simple" auth="true"
         location="component://workeffort/minilang/timesheet/TimesheetServices.xml" invoke="getTimeEntryRate">
         <description>Creates TimeEntry</description>
+        <permission-service service-name="workEffortManagerPermission" main-action="VIEW"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <attribute name="currencyUomId" mode="IN" type="String" optional="true"/>
         <attribute name="rateAmount" type="BigDecimal" mode="OUT" optional="true"/>

Modified: ofbiz/trunk/framework/entityext/minilang/EntitySyncServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/minilang/EntitySyncServices.xml?rev=1768188&r1=1768187&r2=1768188&view=diff
==============================================================================
--- ofbiz/trunk/framework/entityext/minilang/EntitySyncServices.xml (original)
+++ ofbiz/trunk/framework/entityext/minilang/EntitySyncServices.xml Sat Nov  5 11:10:57 2016
@@ -21,11 +21,6 @@ under the License.
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
     <simple-method method-name="createEntitySync" short-description="Create a EntitySync">
-        <check-permission permission="ENTITY_SYNC" action="_CREATE">
-            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <make-value value-field="newEntity" entity-name="EntitySync"/>
         <set-nonpk-fields map="parameters" value-field="newEntity"/>
 
@@ -36,22 +31,12 @@ under the License.
         <create-value value-field="newEntity"/>
     </simple-method>
     <simple-method method-name="updateEntitySync" short-description="Update a EntitySync">
-        <check-permission permission="ENTITY_SYNC" action="_UPDATE">
-            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <set field="lookupPKMap.entitySyncId" from-field="parameters.entitySyncId"/>
         <find-by-primary-key entity-name="EntitySync" map="lookupPKMap" value-field="valueToStore"/>
         <set-nonpk-fields map="parameters" value-field="valueToStore"/>
         <store-value value-field="valueToStore"/>
     </simple-method>
     <simple-method method-name="resetEntitySyncStatusToNotStarted" short-description="Update a EntitySync, set the Status to ESR_NOT_STARTED, but ONLY if running (ie in ESR_RUNNING)">
-        <check-permission permission="ENTITY_SYNC" action="_UPDATE">
-            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <!-- TODO: add some code to make sure, as much as possible, that this really isn't running -->
         <set field="lookupPKMap.entitySyncId" from-field="parameters.entitySyncId"/>
         <find-by-primary-key entity-name="EntitySync" map="lookupPKMap" value-field="valueToStore"/>
@@ -63,11 +48,6 @@ under the License.
 
     <!-- EntitySyncHistory services -->
     <simple-method method-name="createEntitySyncHistory" short-description="Create EntitySyncHistory">
-        <check-permission permission="ENTITY_SYNC" action="_CREATE">
-            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <make-value value-field="newEntity" entity-name="EntitySyncHistory"/>
         <set-pk-fields map="parameters" value-field="newEntity"/>
         <now-timestamp field="newEntity.startDate"/>
@@ -81,11 +61,6 @@ under the License.
         <store-value value-field="entitySync"/>
     </simple-method>
     <simple-method method-name="updateEntitySyncHistory" short-description="Update EntitySyncHistory">
-        <check-permission permission="ENTITY_SYNC" action="_UPDATE">
-            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <make-value value-field="lookupPKMap" entity-name="EntitySyncHistory"/>
         <set-pk-fields map="parameters" value-field="lookupPKMap"/>
         <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
@@ -93,11 +68,6 @@ under the License.
         <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteEntitySyncHistory" short-description="Delete EntitySyncHistory">
-        <check-permission permission="ENTITY_SYNC" action="_DELETE">
-            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <make-value value-field="lookupPKMap" entity-name="EntitySyncHistory"/>
         <set-pk-fields map="parameters" value-field="lookupPKMap"/>
         <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
@@ -106,22 +76,12 @@ under the License.
 
     <!-- EntitySyncInclude services -->
     <simple-method method-name="createEntitySyncInclude" short-description="Create EntitySyncInclude">
-        <check-permission permission="ENTITY_SYNC" action="_CREATE">
-            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <make-value value-field="newEntity" entity-name="EntitySyncInclude"/>
         <set-pk-fields map="parameters" value-field="newEntity"/>
         <set-nonpk-fields map="parameters" value-field="newEntity"/>
         <create-value value-field="newEntity"/>
     </simple-method>
     <simple-method method-name="updateEntitySyncInclude" short-description="Update EntitySyncInclude">
-        <check-permission permission="ENTITY_SYNC" action="_UPDATE">
-            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <make-value value-field="lookupPKMap" entity-name="EntitySyncInclude"/>
         <set-pk-fields map="parameters" value-field="lookupPKMap"/>
         <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
@@ -129,14 +89,14 @@ under the License.
         <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteEntitySyncInclude" short-description="Delete EntitySyncInclude">
-        <check-permission permission="ENTITY_SYNC" action="_DELETE">
-            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
-        </check-permission>
-        <check-errors/>
-
         <make-value value-field="lookupPKMap" entity-name="EntitySyncInclude"/>
         <set-pk-fields map="parameters" value-field="lookupPKMap"/>
         <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
+
+    <simple-method method-name="entitySyncPermissionCheck" short-description="Check user permission for entity sync.">
+        <set field="primaryPermission" value="ENTITY_SYNC"/>
+        <call-simple-method method-name="genericBasePermissionCheck" xml-resource="component://common/minilang/permission/CommonPermissionServices.xml"/>
+    </simple-method>
 </simple-methods>

Modified: ofbiz/trunk/framework/entityext/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/servicedef/services.xml?rev=1768188&r1=1768187&r2=1768188&view=diff
==============================================================================
--- ofbiz/trunk/framework/entityext/servicedef/services.xml (original)
+++ ofbiz/trunk/framework/entityext/servicedef/services.xml Sat Nov  5 11:10:57 2016
@@ -170,18 +170,21 @@ under the License.
     <service name="createEntitySync" default-entity-name="EntitySync" engine="simple"
             location="component://entityext/minilang/EntitySyncServices.xml" invoke="createEntitySync" auth="true">
         <description>Create EntitySync</description>
+        <permission-service service-name="entitySyncPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="OUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateEntitySync" default-entity-name="EntitySync" engine="simple"
             location="component://entityext/minilang/EntitySyncServices.xml" invoke="updateEntitySync" auth="true">
         <description>Update EntitySync</description>
+        <permission-service service-name="entitySyncPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="createEntitySyncInclude" default-entity-name="EntitySyncInclude" engine="simple"
             location="component://entityext/minilang/EntitySyncServices.xml" invoke="createEntitySyncInclude" auth="true">
         <description>Create EntitySyncInclude</description>
+        <permission-service service-name="entitySyncPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="applEnumId" optional="false"/>
@@ -189,12 +192,14 @@ under the License.
     <service name="updateEntitySyncInclude" default-entity-name="EntitySyncInclude" engine="simple"
             location="component://entityext/minilang/EntitySyncServices.xml" invoke="updateEntitySyncInclude" auth="true">
         <description>Update EntitySyncInclude</description>
+        <permission-service service-name="entitySyncPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteEntitySyncInclude" default-entity-name="EntitySyncInclude" engine="simple"
             location="component://entityext/minilang/EntitySyncServices.xml" invoke="deleteEntitySyncInclude" auth="true">
         <description>Delete EntitySyncInclude</description>
+        <permission-service service-name="entitySyncPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <service name="updateEntitySyncRunning" engine="simple"
@@ -205,6 +210,7 @@ under the License.
     <service name="createEntitySyncHistory" default-entity-name="EntitySyncHistory" engine="simple"
             location="component://entityext/minilang/EntitySyncServices.xml" invoke="createEntitySyncHistory" auth="true" require-new-transaction="true">
         <description>Create EntitySyncHistory</description>
+        <permission-service service-name="entitySyncPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="startDate" mode="OUT"/>
@@ -212,12 +218,14 @@ under the License.
     <service name="updateEntitySyncHistory" default-entity-name="EntitySyncHistory" engine="simple"
             location="component://entityext/minilang/EntitySyncServices.xml" invoke="updateEntitySyncHistory" auth="true" require-new-transaction="true">
         <description>Update EntitySyncHistory</description>
+        <permission-service service-name="entitySyncPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteEntitySyncHistory" default-entity-name="EntitySyncHistory" engine="simple"
             location="component://entityext/minilang/EntitySyncServices.xml" invoke="deleteEntitySyncHistory" auth="true" require-new-transaction="true">
         <description>Delete EntitySyncHistory</description>
+        <permission-service service-name="entitySyncPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <service name="updateOfflineEntitySync" engine="java"
@@ -232,6 +240,7 @@ under the License.
     <service name="resetEntitySyncStatusToNotStarted" engine="simple"
             location="component://entityext/minilang/EntitySyncServices.xml" invoke="resetEntitySyncStatusToNotStarted" auth="true" transaction-timeout="600">
         <description>Generally run manually to reset the status of an EntitySync when it has "crashed". Update a EntitySync, set the Status to ESR_NOT_STARTED, but ONLY if running (ie in ESR_RUNNING)</description>
+        <permission-service service-name="entitySyncPermissionCheck" main-action="UPDATE"/>
         <attribute name="entitySyncId" type="String" mode="IN" optional="false"/>
     </service>
 
@@ -450,4 +459,9 @@ under the License.
         <description>Delete a ServerHitType</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
+    <service name="entitySyncPermissionCheck" engine="simple"
+             location="component://entityext/minilang/EntitySyncServices.xml" invoke="entitySyncPermissionCheck">
+        <description>Entity sync permission Checking Logic</description>
+        <implements service="permissionInterface"/>
+    </service>
 </services>

Modified: ofbiz/trunk/specialpurpose/scrum/minilang/ScrumServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/minilang/ScrumServices.xml?rev=1768188&r1=1768187&r2=1768188&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/minilang/ScrumServices.xml (original)
+++ ofbiz/trunk/specialpurpose/scrum/minilang/ScrumServices.xml Sat Nov  5 11:10:57 2016
@@ -1400,10 +1400,6 @@
         </if-not-empty>
     </simple-method>
     <simple-method method-name="scrumAddWorkEffortTimeToInvoice" short-description="Scrum Add Work Effort Time to Invoice">
-        <check-permission permission="WORKEFFORTMGR" action="_CREATE">
-            <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/>
-        </check-permission>
-        <check-errors/>
         <entity-one entity-name="WorkEffort" value-field="workEffort"/>
         <if-empty field="parameters.invoiceId">
             <set-service-fields service-name="createInvoice" map="parameters" to-map="createInvoiceMap"/>

Modified: ofbiz/trunk/specialpurpose/scrum/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/servicedef/services.xml?rev=1768188&r1=1768187&r2=1768188&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/servicedef/services.xml (original)
+++ ofbiz/trunk/specialpurpose/scrum/servicedef/services.xml Sat Nov  5 11:10:57 2016
@@ -159,6 +159,7 @@ under the License.
     <service name="scrumAddWorkEffortTimeToNewInvoice" default-entity-name="Timesheet" engine="simple" auth="true"
         location="component://scrum/minilang/ScrumServices.xml" invoke="scrumAddWorkEffortTimeToInvoice">
         <description>Add WorkEffort Time to a new Invoice</description>
+        <permission-service service-name="workEffortGenericPermission" main-action="CREATE"/>
         <attribute name="workEffortId" type="String" mode="IN" optional="false"/>
         <attribute name="partyIdFrom" type="String" mode="IN" optional="false"/>
         <attribute name="partyId" type="String" mode="IN" optional="false"/>