svn commit: r600381 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml script/org/ofbiz/accounting/permissions/PermissionServices.xml servicedef/services_ledger.xml

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

svn commit: r600381 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml script/org/ofbiz/accounting/permissions/PermissionServices.xml servicedef/services_ledger.xml

adrianc
Author: adrianc
Date: Sun Dec  2 13:41:24 2007
New Revision: 600381

URL: http://svn.apache.org/viewvc?rev=600381&view=rev
Log:
Accounting GL permissions work.

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=600381&r1=600380&r2=600381&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Sun Dec  2 13:41:24 2007
@@ -20,11 +20,9 @@
 
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
+
     <!-- ========= GlAccount methods ========= -->
     <simple-method method-name="createGlAccount" short-description="Create an GlAccount">
-        <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run createGlAccount you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <make-value entity-name="GlAccount" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
 
@@ -40,9 +38,6 @@
         <create-value value-name="newEntity"/>
     </simple-method>
     <simple-method method-name="updateGlAccount" short-description="Update an GlAccount">
-        <check-permission permission="ACCOUNTING" action="_UPDATE"><fail-message message="Security Error: to run updateGlAccount you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <make-value entity-name="GlAccount" value-name="lookupPKMap"/>
         <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
         <find-by-primary-key map-name="lookupPKMap" value-name="lookedUpValue"/>
@@ -50,9 +45,6 @@
         <store-value value-name="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteGlAccount" short-description="Delete an GlAccount">
-        <check-permission permission="ACCOUNTING" action="_DELETE"><fail-message message="Security Error: to run deleteGlAccount you must have the ACCOUNTING_DELETE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <make-value entity-name="GlAccount" value-name="lookupPKMap"/>
         <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
         <find-by-primary-key map-name="lookupPKMap" value-name="lookedUpValue"/>
@@ -61,9 +53,6 @@
     
     <!-- ========= GlAccountOrganization methods ========= -->
     <simple-method method-name="createGlAccountOrganization" short-description="Create GlAccountOrganization">
-        <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run createGlAccountOrganization you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <make-value entity-name="GlAccountOrganization" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
@@ -71,9 +60,6 @@
         <create-value value-name="newEntity"/>
     </simple-method>
     <simple-method method-name="updateGlAccountOrganization" short-description="Update GlAccountOrganization">
-        <check-permission permission="ACCOUNTING" action="_UPDATE"><fail-message message="Security Error: to run updateGlAccountOrganization you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <make-value entity-name="GlAccountOrganization" value-name="lookupPKMap"/>
         <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
         <find-by-primary-key map-name="lookupPKMap" value-name="lookedUpValue"/>
@@ -82,9 +68,6 @@
         <store-value value-name="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteGlAccountOrganization" short-description="Delete GlAccountOrganization">
-        <check-permission permission="ACCOUNTING" action="_DELETE"><fail-message message="Security Error: to run deleteGlAccountOrganization you must have the ACCOUNTING_DELETE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <make-value entity-name="GlAccountOrganization" value-name="lookupPKMap"/>
         <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
         <find-by-primary-key map-name="lookupPKMap" value-name="lookedUpValue"/>
@@ -124,9 +107,6 @@
     </simple-method>
       
     <simple-method method-name="createGlJournal" short-description="Create an GlJournal">
-        <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run createGlJournal you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <make-value entity-name="GlJournal" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
 
@@ -137,17 +117,11 @@
         <create-value value-name="newEntity"/>
     </simple-method>
     <simple-method method-name="updateGlJournal" short-description="Update an GlJournal">
-        <check-permission permission="ACCOUNTING" action="_UPDATE"><fail-message message="Security Error: to run updateGlJournal you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <entity-one entity-name="GlJournal" value-name="lookedUpValue"/>
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
         <store-value value-name="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteGlJournal" short-description="Delete an GlJournal">
-        <check-permission permission="ACCOUNTING" action="_DELETE"><fail-message message="Security Error: to run deleteGlJournal you must have the ACCOUNTING_DELETE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <entity-one entity-name="GlJournal" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
@@ -221,9 +195,6 @@
 
     <!-- ========= GlReconciliation methods ========= -->
     <simple-method method-name="createGlReconciliation" short-description="Create an GlReconciliation">
-        <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run createGlReconciliation you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <make-value entity-name="GlReconciliation" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
 
@@ -237,9 +208,6 @@
         <create-value value-name="newEntity"/>
     </simple-method>
     <simple-method method-name="updateGlReconciliation" short-description="Update an GlReconciliation">
-        <check-permission permission="ACCOUNTING" action="_UPDATE"><fail-message message="Security Error: to run updateGlReconciliation you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <entity-one entity-name="GlReconciliation" value-name="lookedUpValue"/>
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
         
@@ -247,9 +215,6 @@
         <store-value value-name="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteGlReconciliation" short-description="Delete an GlReconciliation">
-        <check-permission permission="ACCOUNTING" action="_DELETE"><fail-message message="Security Error: to run deleteGlReconciliation you must have the ACCOUNTING_DELETE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <entity-one entity-name="GlReconciliation" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
@@ -262,9 +227,6 @@
     
     <!-- ========= GlReconciliationEntry methods ========= -->
     <simple-method method-name="createGlReconciliationEntry" short-description="Add Entry To GlReconciliation">
-        <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run createGlReconciliationEntry you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <make-value entity-name="GlReconciliationEntry" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
@@ -274,9 +236,6 @@
         <call-simple-method method-name="updateGlReconciliationLastModified"/>
     </simple-method>
     <simple-method method-name="updateGlReconciliationEntry" short-description="Update Entry To GlReconciliation">
-        <check-permission permission="ACCOUNTING" action="_UPDATE"><fail-message message="Security Error: to run updateGlReconciliationEntry you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <entity-one entity-name="GlReconciliationEntry" value-name="lookedUpValue"/>
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
         <store-value value-name="lookedUpValue"/>
@@ -285,9 +244,6 @@
         <call-simple-method method-name="updateGlReconciliationLastModified"/>
     </simple-method>
     <simple-method method-name="deleteGlReconciliationEntry" short-description="Remove Entry From GlReconciliation">
-        <check-permission permission="ACCOUNTING" action="_DELETE"><fail-message message="Security Error: to run deleteGlReconciliationEntry you must have the ACCOUNTING_DELETE or ACCOUNTING_ADMIN permission"/></check-permission>
-        <check-errors/>
-
         <entity-one entity-name="GlReconciliationEntry" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
 

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml?rev=600381&r1=600380&r2=600381&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml Sun Dec  2 13:41:24 2007
@@ -99,4 +99,10 @@
         <call-simple-method method-name="basePlusRolePermissionCheck"/>
     </simple-method>
 
+    <!-- Returns hasPermission=true if user has one of the ACCTG_ATX CRUD+ADMIN permissions -->
+    <simple-method method-name="acctgTransactionPermissionCheck" short-description="Accounting transaction permission logic">
+        <set field="primaryPermission" value="ACCTG_ATX"/>
+        <call-simple-method method-name="genericBasePermissionCheck" xml-resource="component://common/script/org/ofbiz/common/permission/CommonPermissionServices.xml"/>
+    </simple-method>
+
 </simple-methods>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml?rev=600381&r1=600380&r2=600381&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml Sun Dec  2 13:41:24 2007
@@ -30,6 +30,7 @@
     <service name="createGlAccount" default-entity-name="GlAccount" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="createGlAccount" auth="true">
         <description>Create a GlAccount record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="glAccountTypeId" optional="false"/>
@@ -40,30 +41,35 @@
     <service name="updateGlAccount" default-entity-name="GlAccount" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="updateGlAccount" auth="true">
         <description>Update a GlAccount record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteGlAccount" default-entity-name="GlAccount" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="deleteGlAccount" auth="true">
         <description>Delete a GlAccount record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
     <service name="createGlAccountOrganization" default-entity-name="GlAccountOrganization" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="createGlAccountOrganization" auth="true">
         <description>Create a GlAccount record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateGlAccountOrganization" default-entity-name="GlAccountOrganization" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="updateGlAccountOrganization" auth="true">
         <description>Update a GlAccount record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteGlAccountOrganization" default-entity-name="GlAccountOrganization" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="deleteGlAccountOrganization" auth="true">
         <description>Delete a GlAccount record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
@@ -85,6 +91,7 @@
     <service name="calculateGlJournalTrialBalance" default-entity-name="GlJournal" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="calculateGlJournalTrialBalance" auth="true">
         <description>Calculate Trial Balance for a GlJournal</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="VIEW"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <attribute name="debitTotal" type="Double" mode="OUT" optional="false"/>
         <attribute name="creditTotal" type="Double" mode="OUT" optional="false"/>
@@ -98,6 +105,7 @@
     <service name="createGlJournal" default-entity-name="GlJournal" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="createGlJournal" auth="true">
         <description>Create a GlJournal record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="OUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <exclude field-name="isPosted"/>
@@ -108,6 +116,7 @@
     <service name="updateGlJournal" default-entity-name="GlJournal" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="updateGlJournal" auth="true">
         <description>Update a GlJournal record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <exclude field-name="isPosted"/>
@@ -117,6 +126,7 @@
     <service name="deleteGlJournal" default-entity-name="GlJournal" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="deleteGlJournal" auth="true">
         <description>Delete a GlJournal record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
@@ -124,6 +134,7 @@
     <service name="createGlReconciliation" default-entity-name="GlReconciliation" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="createGlReconciliation" auth="true">
         <description>Create a GlReconciliation record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="OUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <exclude field-name="createdByUserLogin"/>
@@ -134,6 +145,7 @@
     <service name="updateGlReconciliation" default-entity-name="GlReconciliation" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="updateGlReconciliation" auth="true">
         <description>Update a GlReconciliation record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <exclude field-name="createdByUserLogin"/>
@@ -143,24 +155,28 @@
     <service name="deleteGlReconciliation" default-entity-name="GlReconciliation" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="deleteGlReconciliation" auth="true">
         <description>Delete a GlReconciliation record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
     <service name="createGlReconciliationEntry" default-entity-name="GlReconciliationEntry" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="createGlReconciliationEntry" auth="true">
         <description>Add an Entry to a GlReconciliation</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="false"/>
     </service>
     <service name="updateGlReconciliationEntry" default-entity-name="GlReconciliationEntry" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="updateGlReconciliationEntry" auth="true">
         <description>Update an Entry to a GlReconciliation record</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="false"/>
     </service>
     <service name="deleteGlReconciliationEntry" default-entity-name="GlReconciliationEntry" engine="simple"
             location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="deleteGlReconciliationEntry" auth="true">
         <description>Remove an Entry from a GlReconciliation</description>
+        <permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
@@ -179,27 +195,21 @@
     <service name="createAcctgTrans" default-entity-name="AcctgTrans" engine="simple"
             location="org/ofbiz/accounting/ledger/AcctgTransServices.xml" invoke="createAcctgTrans" auth="true">
         <description>Create a AcctgTrans record.  isPosted is forced to "N"</description>
-        <required-permissions join-type="OR">
-            <check-permission permission="ACCOUNTING" action="_ATX_CREATE"/>
-        </required-permissions>
+        <permission-service service-name="acctgTransactionPermissionCheck" main-action="CREATE"/>
         <implements service="interfaceAcctgTrans"/>
         <auto-attributes include="pk" mode="OUT" optional="false"/>
     </service>
     <service name="updateAcctgTrans" default-entity-name="AcctgTrans" engine="simple"
             location="org/ofbiz/accounting/ledger/AcctgTransServices.xml" invoke="updateAcctgTrans" auth="true">
         <description>Update a AcctgTrans record</description>
-        <required-permissions join-type="OR">
-            <check-permission permission="ACCOUNTING" action="_ATX_UPDATE"/>
-        </required-permissions>
+        <permission-service service-name="acctgTransactionPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteAcctgTrans" default-entity-name="AcctgTrans" engine="simple"
             location="org/ofbiz/accounting/ledger/AcctgTransServices.xml" invoke="deleteAcctgTrans" auth="true">
         <description>Delete a AcctgTrans record</description>
-        <required-permissions join-type="OR">
-            <check-permission permission="ACCOUNTING" action="_ATX_DELETE"/>
-        </required-permissions>
+        <permission-service service-name="acctgTransactionPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
@@ -217,9 +227,7 @@
     <service name="createAcctgTransEntry" default-entity-name="AcctgTransEntry" engine="simple"
             location="org/ofbiz/accounting/ledger/AcctgTransServices.xml" invoke="createAcctgTransEntry" auth="true">
         <description>Add an Entry to a AcctgTrans.  Will use baseCurrencyUomId in PartyAcctgPreference if no currencyUomId is in parameters.</description>
-        <required-permissions join-type="OR">
-            <check-permission permission="ACCOUNTING" action="_ATX_CREATE"/>
-        </required-permissions>
+        <permission-service service-name="acctgTransactionPermissionCheck" main-action="CREATE"/>
         <implements service="interfaceAcctgTransEntry"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <override name="acctgTransEntrySeqId" mode="OUT"/>
@@ -227,18 +235,14 @@
     <service name="updateAcctgTransEntry" default-entity-name="AcctgTransEntry" engine="simple"
             location="org/ofbiz/accounting/ledger/AcctgTransServices.xml" invoke="updateAcctgTransEntry" auth="true">
         <description>Update an Entry to a AcctgTrans record</description>
-        <required-permissions join-type="OR">
-            <check-permission permission="ACCOUNTING" action="_ATX_UPDATE"/>
-        </required-permissions>
+        <permission-service service-name="acctgTransactionPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deleteAcctgTransEntry" default-entity-name="AcctgTransEntry" engine="simple"
             location="org/ofbiz/accounting/ledger/AcctgTransServices.xml" invoke="deleteAcctgTransEntry" auth="true">
         <description>Remove an Entry from a AcctgTrans</description>
-        <required-permissions join-type="OR">
-            <check-permission permission="ACCOUNTING" action="_ATX_DELETE"/>
-        </required-permissions>
+        <permission-service service-name="acctgTransactionPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
@@ -251,14 +255,11 @@
             check that the debits and credits balance out.  The idea is that unbalanced transactions can be created here, but they will need
             to be created before they are actually posted, and a later posting service will actually check that the transaction is balanced.
         </description>
-        <required-permissions join-type="OR">
-            <check-permission permission="ACCOUNTING" action="_ATX_CREATE"/>
-        </required-permissions>
+        <permission-service service-name="acctgTransactionPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <attribute name="acctgTransEntries" type="java.util.List" mode="IN" optional="false"/>
         <attribute name="acctgTransId" type="String" mode="OUT"/>
-        <!-- TODO: make required-permissions tag work here rather than inside the simple XML -->
     </service>
     <service name="calculateAcctgTransTrialBalance" default-entity-name="AcctgTrans" engine="simple"
             location="org/ofbiz/accounting/ledger/AcctgTransServices.xml" invoke="calculateAcctgTransTrialBalance" auth="true">
@@ -274,9 +275,7 @@
         <description>Post a AcctgTrans and related entries.  This will make sure that the time period is not closed and that
          the sum of the debits and credits are equal.
         </description>
-        <required-permissions join-type="OR">
-            <check-permission permission="ACCOUNTING" action="_ATX_POST"/>
-        </required-permissions>
+        <permission-service service-name="acctgTransactionPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <attribute name="verifyOnly" type="String" mode="IN" optional="true"/>
     </service>
@@ -365,4 +364,10 @@
         <description>Basic General Ledger Permission Checking Logic</description>
         <implements service="permissionInterface"/>
     </service>
+    <service name="acctgTransactionPermissionCheck" engine="simple"
+            location="component://accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml" invoke="acctgTransactionPermissionCheck">
+        <description>Basic General Ledger Permission Checking Logic</description>
+        <implements service="permissionInterface"/>
+    </service>
+
 </services>