svn commit: r574734 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml servicedef/services_fixedasset.xml

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

svn commit: r574734 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml servicedef/services_fixedasset.xml

adrianc
Author: adrianc
Date: Tue Sep 11 16:52:58 2007
New Revision: 574734

URL: http://svn.apache.org/viewvc?rev=574734&view=rev
Log:
Converted Fixed Asset service permission checking to use the new permission service method. Also fixed up the service descriptions.

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml?rev=574734&r1=574733&r2=574734&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml Tue Sep 11 16:52:58 2007
@@ -27,12 +27,6 @@
     
     <!-- create a new Fixed Asset header record -->
     <simple-method method-name="createFixedAsset" short-description="Create an FixedAsset">
-        <check-permission permission="ACCOUNTING" action="_CREATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_CREATE"/>
-            <fail-message message="Security Error: to run createFixedAsset you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_CREATE permission"/>
-        </check-permission>        
-        <check-errors/>
-        
           <!-- create new entity and create all the fields -->
         <make-value value-name="newEntity" entity-name="FixedAsset"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
@@ -59,12 +53,6 @@
 
     <!-- update an existing Fixed Asset header Record -->
     <simple-method method-name="updateFixedAsset" short-description="Update an existing FixedAsset">
-        <check-permission permission="ACCOUNTING" action="_UPDATE" >
-            <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: to run updateFixedAsset you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
-
         <entity-one entity-name="FixedAsset" value-name="lookedUpValue"/>
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
         <store-value value-name="lookedUpValue"/>
@@ -76,12 +64,6 @@
     
     <!-- add a product to a fixed Asset -->
     <simple-method method-name="addFixedAssetProduct" short-description="Add Product to FixedAsset">
-        <check-permission permission="ACCOUNTING" action="_CREATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_CREATE"/>
-            <fail-message message="Security Error: to run updateFixedAssetProduct you must have the ACCOUNTING_CREATEUPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
-
         <make-value value-name="newEntity" entity-name="FixedAssetProduct"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
@@ -95,12 +77,6 @@
 
     <!-- update the product to fixed Asset link -->    
     <simple-method method-name="updateFixedAssetProduct" short-description="Update Products of a FixedAsset">
-        <check-permission permission="ACCOUNTING" action="_UPDATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: to run updateFixedAssetProduct you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
-
         <entity-one entity-name="FixedAssetProduct" value-name="lookedUpValue"/>
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
         <store-value value-name="lookedUpValue"/>
@@ -108,12 +84,6 @@
     
     <!-- remove the productlink from the Fixed Asset -->
     <simple-method method-name="removeFixedAssetProduct" short-description="Remove Product From FixedAsset">
-        <check-permission permission="ACCOUNTING" action="_DELETE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_DELETE"/>
-            <fail-message message="Security Error: to run removeFixedAssetProduct you must have the ACCOUNTING_DELETE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
-
         <entity-one entity-name="FixedAssetProduct" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
@@ -237,6 +207,7 @@
         <set value="CREATE" field="checkAction"/>
         <!-- note the the user must be associated with the target FixedAsset with the role limited permission -->
         <set value="fixedAssetIdTo" field="fixedAssetIdName"/>
+        <!-- TODO: Create the checkFixedAssetRelatedPermission simple method -->
         <call-simple-method method-name="checkFixedAssetRelatedPermission"/>
         <check-errors/>
 
@@ -398,11 +369,6 @@
 
     <!-- create a new FixedAssetStdCost -->
     <simple-method method-name="createFixedAssetStdCost" short-description="Create a FixedAssetStdCost">
-        <check-permission permission="ACCOUNTING" action="_CREATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_CREATE"/>
-            <fail-message message="Security Error: to run createFixedAssetStdCost you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_CREATE permission"/>
-        </check-permission>
-        <check-errors/>
         <!-- TODO: we should cancel the existing costs of the same type -->
         <!-- create new entity and create all the fields -->
 
@@ -423,24 +389,12 @@
     </simple-method>
     <!-- update an existing FixedAssetStdCost -->
     <simple-method method-name="updateFixedAssetStdCost" short-description="Update an existing FixedAssetStdCost">
-        <check-permission permission="ACCOUNTING" action="_UPDATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: to run updateFixedAssetStdCost you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>
-        <check-errors/>
-
         <entity-one entity-name="FixedAssetStdCost" value-name="fixedAssetStdCost"/>
         <set-nonpk-fields map-name="parameters" value-name="fixedAssetStdCost"/>
         <store-value value-name="fixedAssetStdCost"/>
     </simple-method>
     <!-- cancel an existing Agreement -->
     <simple-method method-name="cancelFixedAssetStdCost" short-description="Cancel an existing FixedAssetStdCost">
-        <check-permission permission="ACCOUNTING" action="_UPDATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: to run cancelFixedAssetStdCost you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>
-        <check-errors/>
-
         <entity-one entity-name="FixedAssetStdCost" value-name="fixedAssetStdCost"/>
         <now-timestamp-to-env env-name="fixedAssetStdCost.thruDate"/>
         <store-value value-name="fixedAssetStdCost"/>
@@ -448,43 +402,23 @@
 
     <!-- Fixed Asset Identification "FIXED_ASSET_IDENT"-->
     <simple-method method-name="createFixedAssetIdent" short-description="Create an FixedAssetIdent">
-        <check-permission permission="ACCOUNTING" action="_CREATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_CREATE"/>
-            <fail-message message="Security Error: to run createFixedAsset you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_CREATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <make-value value-name="newEntity" entity-name="FixedAssetIdent"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
         <create-value value-name="newEntity"/>
     </simple-method>
     <simple-method method-name="updateFixedAssetIdent" short-description="Update an existing FixedAssetIdent">
-        <check-permission permission="ACCOUNTING" action="_UPDATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: to run updateFixedAsset you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <entity-one entity-name="FixedAssetIdent" value-name="lookedUpValue"/>
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
         <store-value value-name="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="removeFixedAssetIdent" short-description="Remove Fixed Assets Idents FixedAssetIdent">
-        <check-permission permission="ACCOUNTING" action="_DELETE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_DELETE"/>
-            <fail-message message="Security Error: to run removeFixedAssetProduct you must have the ACCOUNTING_DELETE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <entity-one entity-name="FixedAssetIdent" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
 
     <!-- FixedAsset Registration Create/Update/Delete"-->
     <simple-method method-name="createFixedAssetRegistration" short-description="Create FixedAsset Registration">
-        <check-permission permission="ACCOUNTING" action="_CREATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_CREATE"/>
-            <fail-message message="Security Error: to run createFixedAssetRegistration you must have the ACCOUNTING_CREATEUPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_CREATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <make-value value-name="newEntity" entity-name="FixedAssetRegistration"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
@@ -494,32 +428,17 @@
         <create-value value-name="newEntity"/>
     </simple-method>
     <simple-method method-name="updateFixedAssetRegistration" short-description="Update an existing FixedAsset Registration">
-        <check-permission permission="ACCOUNTING" action="_UPDATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: to run updateFixedAssetRegistration you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <entity-one entity-name="FixedAssetRegistration" value-name="lookedUpValue"/>
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
         <store-value value-name="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteFixedAssetRegistration" short-description="Delete FixedAsset Registration">
-        <check-permission permission="ACCOUNTING" action="_DELETE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_DELETE"/>
-            <fail-message message="Security Error: to run deleteFixedAssetRegistration you must have the ACCOUNTING_DELETE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <entity-one entity-name="FixedAssetRegistration" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
 
     <!--  create/update/delete FixedAssetMaint -->
     <simple-method method-name="createFixedAssetMaint" short-description="create a FixedAssetMaint">
-        <check-permission permission="ACCOUNTING" action="_CREATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_CREATE"/>
-            <fail-message message="Security Error: to run createFixedAssetMaint you must have the ACCOUNTING_CREATEUPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_CREATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <make-value entity-name="FixedAssetMaint" value-name="newEntity"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
         <make-next-seq-id value-name="newEntity" seq-field-name="maintHistSeqId"/> <!-- this finds the next sub-sequence ID -->
@@ -567,11 +486,6 @@
         <create-value value-name="newEntity"/>  
     </simple-method>  
     <simple-method method-name="updateFixedAssetMaint" short-description="Update an existing FixedAsset Maintenance">
-        <check-permission permission="ACCOUNTING" action="_UPDATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: to run updateFixedAssetMaint you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <entity-one entity-name="FixedAssetMaint" value-name="lookedUpValue"/>
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
         <if-not-empty field-name="parameters.productMaintSeqId">
@@ -585,54 +499,29 @@
         <store-value value-name="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteFixedAssetMaint" short-description="Delete FixedAsset Maintenance">
-        <check-permission permission="ACCOUNTING" action="_DELETE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_DELETE"/>
-            <fail-message message="Security Error: to run deleteFixedAssetMaint you must have the ACCOUNTING_DELETE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <entity-one entity-name="FixedAssetMaint" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
 
     <!--  create/update/delete FixedAssetMaintMeter -->
     <simple-method method-name="createFixedAssetMaintMeter" short-description="create a FixedAssetMaintMeter">
-        <check-permission permission="ACCOUNTING" action="_CREATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_CREATE"/>
-            <fail-message message="Security Error: to run createFixedAssetMaintMeter you must have the ACCOUNTING_CREATEUPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_CREATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <make-value entity-name="FixedAssetMaintMeter" value-name="newEntity"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         <create-value value-name="newEntity"/>  
     </simple-method>  
     <simple-method method-name="updateFixedAssetMaintMeter" short-description="Update an existing FixedAsset Maintenance Meter Reading">
-        <check-permission permission="ACCOUNTING" action="_UPDATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: to run updateFixedAssetMaintMeter you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <entity-one entity-name="FixedAssetMaintMeter" value-name="lookedUpValue"/>
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
         <store-value value-name="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteFixedAssetMaintMeter" short-description="Delete FixedAsset Maintenance Meter">
-        <check-permission permission="ACCOUNTING" action="_DELETE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_DELETE"/>
-            <fail-message message="Security Error: to run deleteFixedAssetMaintMeter you must have the ACCOUNTING_DELETE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>        
-        <check-errors/>
         <entity-one entity-name="FixedAssetMaintMeter" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
     
     <!--  create/update/delete FixedAssetMaintOrder -->
     <simple-method method-name="createFixedAssetMaintOrder" short-description="Create a FixedAsset Maintenance Order">
-        <check-permission permission="ACCOUNTING" action="_CREATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_CREATE"/>
-            <fail-property resource="AccountingUiLabels" property="AccountingCreateFixedAssetMaintOrderPermissionError"/>            
-        </check-permission>        
-        <check-errors/>
            <!-- Check, should exist orderId and orderItemId -->
         <entity-one entity-name="OrderHeader" value-name="lookedUpValue"/>
         <if-empty field-name="lookedUpValue">
@@ -670,11 +559,6 @@
         <create-value value-name="newEntity"/>  
     </simple-method>  
     <simple-method method-name="deleteFixedAssetMaintOrder" short-description="Delete FixedAsset Maintenance Order">
-        <check-permission permission="ACCOUNTING" action="_DELETE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_DELETE"/>
-            <fail-property resource="AccountingUiLabels" property="AccountingDeleteFixedAssetMaintOrderPermissionError"/>            
-        </check-permission>        
-        <check-errors/>
         <entity-one entity-name="FixedAssetMaintOrder" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
@@ -702,4 +586,27 @@
         <remove-value value-name="newEntity"/>
     </simple-method>
         
+    <!-- ==============Permission Checking Service============= -->
+    <simple-method method-name="fixedAssetPermissionCheck" short-description="Fixed Asset permission logic">
+        <if-has-permission permission="ACCOUNTING_ADMIN">
+            <set field="hasPermission" type="Boolean" value="true"/>
+            <else>
+                <if-has-permission permission="ACCOUNTING" action="_${parameters.mainAction}">
+                    <set field="hasPermission" type="Boolean" value="true"/>
+                    <else>
+                        <if-has-permission permission="ACCOUNTING_ROLE" action="_${parameters.mainAction}">
+                            <set field="hasPermission" type="Boolean" value="true"/>
+                            <else>
+                                <set field="hasPermission" type="Boolean" value="false"/>
+                                <set field="failMessage" value="Security Error: you must have the ACCOUNTING_${parameters.mainAction} or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_${parameters.mainAction} permission"/>
+                                <field-to-result field-name="failMessage"/>
+                            </else>
+                        </if-has-permission>
+                    </else>
+                </if-has-permission>
+            </else>
+        </if-has-permission>
+        <field-to-result field-name="hasPermission"/>
+    </simple-method>
+
 </simple-methods>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml?rev=574734&r1=574733&r2=574734&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml Tue Sep 11 16:52:58 2007
@@ -27,14 +27,16 @@
     <!-- Fixed Asset  -->
     <service name="createFixedAsset" default-entity-name="FixedAsset" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="createFixedAsset" auth="true">
-        <description>Create an FixedAsset</description>
+        <description>Create a Fixed Asset</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="INOUT" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="fixedAssetTypeId" optional="false"/>
     </service>
     <service name="updateFixedAsset" default-entity-name="FixedAsset" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="updateFixedAsset" auth="true">
-        <description>Update an FixedAsset</description>
+        <description>Update a Fixed Asset</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="fixedAssetTypeId" optional="false"/>
@@ -44,6 +46,7 @@
     <service name="addFixedAssetProduct" default-entity-name="FixedAssetProduct" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="addFixedAssetProduct" auth="true">
         <description>Add Product To Fixed Asset</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="fromDate" optional="true"/>
@@ -52,13 +55,15 @@
     <service name="updateFixedAssetProduct" default-entity-name="FixedAssetProduct" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="updateFixedAssetProduct" auth="true">
         <description>Update the Product to Fixed Asset information</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     
     <service name="removeFixedAssetProduct" default-entity-name="FixedAssetProduct" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="removeFixedAssetProduct" auth="true">
-        <description>Remove Product From FixedAsset</description>
+        <description>Remove Product From Fixed Asset</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
@@ -119,7 +124,7 @@
     <!-- Fixed Asset rollup services -->
    <service name="addFixedAssetToFixedAsset" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="addFixedAssetToFixedAsset" auth="true">
-        <description>Add FixedAsset To FixedAsset</description>
+        <description>Add Fixed Asset To Fixed Asset</description>
         <attribute name="fixedAssetId" type="String" mode="IN" optional="false"/>
         <attribute name="parentFixedAssetId" type="String" mode="IN" optional="false"/>
         <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
@@ -129,7 +134,7 @@
     
     <service name="updateFixedAssetToFixedAsset" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="updateFixedAssetToFixedAsset" auth="true">
-        <description>Update FixedAsset To FixedAsset</description>
+        <description>Update Fixed Asset To Fixed Asset</description>
         <attribute name="fixedAssetId" type="String" mode="IN" optional="false"/>
         <attribute name="parentFixedAssetId" type="String" mode="IN" optional="false"/>
         <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
@@ -139,7 +144,7 @@
     
     <service name="removeFixedAssetFromFixedAsset" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="removeFixedAssetFromFixedAsset" auth="true">
-        <description>Remove FixedAsset From FixedAsset</description>
+        <description>Remove Fixed Asset From Fixed Asset</description>
         <attribute name="fixedAssetId" type="String" mode="IN" optional="false"/>
         <attribute name="parentFixedAssetId" type="String" mode="IN" optional="false"/>
         <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
@@ -147,19 +152,22 @@
     <!-- FixedAssetStdCost  -->
     <service name="createFixedAssetStdCost" default-entity-name="FixedAssetStdCost" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="createFixedAssetStdCost" auth="true">
-        <description>Create a FixedAssetStdCost</description>
+        <description>Create a Fixed Asset Standard Cost</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateFixedAssetStdCost" default-entity-name="FixedAssetStdCost" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="updateFixedAssetStdCost" auth="true">
-        <description>Update a FixedAssetStdCost</description>
+        <description>Update a Fixed Asset Standard Cost</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="cancelFixedAssetStdCost" default-entity-name="FixedAssetStdCost" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="cancelFixedAssetStdCost" auth="true">
-        <description>Cancel a FixedAssetStdCost</description>
+        <description>Cancel a Fixed Asset Standard Cost</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
@@ -167,44 +175,51 @@
     <!-- FixedAssetIdent -->
     <service name="createFixedAssetIdent" default-entity-name="FixedAssetIdent" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="createFixedAssetIdent" auth="true">
-        <description>Create a FixedAssetIdent</description>
+        <description>Create a Fixed Asset Identification</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateFixedAssetIdent" default-entity-name="FixedAssetIdent" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="updateFixedAssetIdent" auth="true">
-        <description>Update a FixedAssetIdent</description>
+        <description>Update a Fixed Asset Identification</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="removeFixedAssetIdent" default-entity-name="FixedAssetIdent" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="removeFixedAssetIdent" auth="true">
-        <description>Remove a FixedAssetIdent</description>
+        <description>Remove a Fixed Asset Identification</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <!-- Equipment Registration Create/Update/Delete-->
     <service name="createFixedAssetRegistration" default-entity-name="FixedAssetRegistration" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="createFixedAssetRegistration" auth="true">
-        <description>Create a FixedAsset Registration</description>
+        <description>Create a Fixed Asset Registration</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="fromDate" optional="true"/>
     </service>
     <service name="updateFixedAssetRegistration" default-entity-name="FixedAssetRegistration" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="updateFixedAssetRegistration" auth="true">
-        <description>Update a FixedAsset Registration</description>
+        <description>Update a Fixed Asset Registration</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteFixedAssetRegistration" default-entity-name="FixedAssetRegistration" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="deleteFixedAssetRegistration" auth="true">
-        <description>Delete a FixedAsset Registration</description>
+        <description>Delete a Fixed Asset Registration</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <!-- FixedAsset Maintenance Create/Update/Delete-->
     <service name="createFixedAssetMaint" default-entity-name="FixedAssetMaint" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="createFixedAssetMaint" auth="true">
-        <description>Create a FixedAsset Maintenance</description>
+        <description>Create a Fixed Asset Maintenance</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <attribute name="maintTemplateWorkEffortId" mode="IN" type="String" optional="true"/>
@@ -212,37 +227,43 @@
     </service>
     <service name="updateFixedAssetMaint" default-entity-name="FixedAssetMaint" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="updateFixedAssetMaint" auth="true">
-        <description>Update a FixedAsset Maintenance</description>
+        <description>Update a Fixed Asset Maintenance</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteFixedAssetMaint" default-entity-name="FixedAssetMaint" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="deleteFixedAssetMaint" auth="true">
-        <description>Remove a FixedAsset Maintenance</description>
+        <description>Remove a Fixed Asset Maintenance</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <!-- FixedAsset Maintenance Meter Create/Update/Delete-->
     <service name="createFixedAssetMaintMeter" default-entity-name="FixedAssetMaintMeter" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="createFixedAssetMaintMeter" auth="true">
-        <description>Create a FixedAsset Maintenance Meter</description>
+        <description>Create a Fixed Asset Maintenance Meter</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateFixedAssetMaintMeter" default-entity-name="FixedAssetMaintMeter" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="updateFixedAssetMaintMeter" auth="true">
-        <description>Update a FixedAsset Maintenance Meter</description>
+        <description>Update a Fixed Asset Maintenance Meter</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteFixedAssetMaintMeter" default-entity-name="FixedAssetMaintMeter" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="deleteFixedAssetMaintMeter" auth="true">
-        <description>Remove a FixedAsset Maintenance Meter</description>
+        <description>Remove a Fixed Asset Maintenance Meter</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <!-- FixedAsset Maintenance Order Create/Update/Delete-->
     <service name="createFixedAssetMaintOrder" default-entity-name="FixedAssetMaintOrder" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="createFixedAssetMaintOrder" auth="true">
-        <description>Create a FixedAsset Maintenance Order</description>
+        <description>Create a Fixed Asset Maintenance Order</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
         <attribute name="fixedAssetId" type="String" mode="IN" optional="false"/>
         <attribute name="maintHistSeqId" type="String" mode="IN" optional="false"/>
         <attribute name="orderId" type="String" mode="IN" optional="false"/>
@@ -251,7 +272,8 @@
     </service>
     <service name="deleteFixedAssetMaintOrder" default-entity-name="FixedAssetMaintOrder" engine="simple"
                 location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="deleteFixedAssetMaintOrder" auth="true">
-        <description>Remove a FixedAsset Maintenance Order</description>
+        <description>Remove a Fixed Asset Maintenance Order</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     
@@ -277,4 +299,9 @@
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     
+    <service name="fixedAssetPermissionCheck" engine="simple"
+            location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="fixedAssetPermissionCheck">
+        <description>Fixed Asset Permission Checking Logic</description>
+        <implements service="permissionInterface"/>
+    </service>
 </services>