Author: adrianc
Date: Sat Dec 1 13:26:55 2007 New Revision: 600198 URL: http://svn.apache.org/viewvc?rev=600198&view=rev Log: Some preliminary work on converting the Accounting component permission checking to the new permission service. Added: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml Modified: ofbiz/trunk/applications/accounting/data/AccountingSecurityData.xml ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml ofbiz/trunk/applications/accounting/servicedef/services_admin.xml ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml ofbiz/trunk/applications/accounting/widget/CommonScreens.xml ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml ofbiz/trunk/applications/accounting/widget/Menus.xml Modified: ofbiz/trunk/applications/accounting/data/AccountingSecurityData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/AccountingSecurityData.xml?rev=600198&r1=600197&r2=600198&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/data/AccountingSecurityData.xml (original) +++ ofbiz/trunk/applications/accounting/data/AccountingSecurityData.xml Sat Dec 1 13:26:55 2007 @@ -78,15 +78,16 @@ <!-- Set up accounting organization preferences security --> <SecurityPermission description="Set organization accounting preferences" permissionId="ACCTG_PREF_CREATE"/> - <SecurityGroupPermission groupId="FULLADMIN" permissionId="ACCTG_PREF_CREATE"/> - <SecurityGroupPermission groupId="BIZADMIN" permissionId="ACCTG_PREF_CREATE"/> <SecurityPermission description="Update organization accounting preferences" permissionId="ACCTG_PREF_UPDATE"/> - <SecurityGroupPermission groupId="FULLADMIN" permissionId="ACCTG_PREF_UPDATE"/> + <SecurityPermission description="Delete organization accounting preferences" permissionId="ACCTG_PREF_DELETE"/> + <SecurityGroupPermission groupId="FULLADMIN" permissionId="ACCTG_PREF_ADMIN"/> + <SecurityGroupPermission groupId="BIZADMIN" permissionId="ACCTG_PREF_CREATE"/> <SecurityGroupPermission groupId="BIZADMIN" permissionId="ACCTG_PREF_UPDATE"/> + <SecurityGroupPermission groupId="BIZADMIN" permissionId="ACCTG_PREF_DELETE"/> - <SecurityPermission description="Set foreign exchange rates" permissionId="ACCTG_FX_ENTRY"/> - <SecurityGroupPermission groupId="FULLADMIN" permissionId="ACCTG_FX_ENTRY"/> - <SecurityGroupPermission groupId="BIZADMIN" permissionId="ACCTG_PREF_CREATE"/> + <SecurityPermission description="Set foreign exchange rates" permissionId="ACCTG_FX_UPDATE"/> + <SecurityGroupPermission groupId="FULLADMIN" permissionId="ACCTG_FX_UPDATE"/> + <SecurityGroupPermission groupId="BIZADMIN" permissionId="ACCTG_FX_UPDATE"/> <!-- For general ledger cccounting transactions. Note that anyone who is authorized for proesses that create accounting transaction entries, such as quick shipping an order, approving an invoice, a return, or authorizing shipments, should have the _CREATE and _POST privileges, but 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=600198&r1=600197&r2=600198&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 Sat Dec 1 13:26:55 2007 @@ -586,27 +586,4 @@ <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> Added: 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=600198&view=auto ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml (added) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml Sat Dec 1 13:26:55 2007 @@ -0,0 +1,58 @@ +<?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. +--> + +<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd"> + + <!-- ============== Basic Permission Checking ============= --> + + <!-- Returns hasPermission=true if user has one of the base ACCOUNTING CRUD+ADMIN permissions --> + <simple-method method-name="basePermissionCheck" short-description="Accounting component base permission logic"> + <set field="primaryPermission" value="ACCOUNTING"/> + <call-simple-method method-name="genericBasePermissionCheck" xml-resource="component://common/script/org/ofbiz/common/permission/CommonPermissionServices.xml"/> + </simple-method> + + <!-- Returns hasPermission=true if user has one of the ACCTG_PREF CRUD+ADMIN permissions --> + <simple-method method-name="preferencePermissionCheck" short-description="Accounting preferences permission logic"> + <set field="primaryPermission" value="ACCTG_PREF"/> + <call-simple-method method-name="genericBasePermissionCheck" xml-resource="component://common/script/org/ofbiz/common/permission/CommonPermissionServices.xml"/> + </simple-method> + + <!-- Returns hasPermission=true if user has one of the ACCTG_FX CRUD+ADMIN permissions --> + <simple-method method-name="acctgFxPermissionCheck" short-description="Accounting preferences permission logic"> + <set field="primaryPermission" value="ACCTG_FX"/> + <call-simple-method method-name="genericBasePermissionCheck" xml-resource="component://common/script/org/ofbiz/common/permission/CommonPermissionServices.xml"/> + <if-compare field-name="hasPermission" operator="not-equals" value="true"> + <!-- Check for deprecated permission --> + <if-has-permission permission="ACCTG_FX_ENTRY"> + <set field="hasPermission" type="Boolean" value="true"/> + <field-to-result field-name="hasPermission"/> + <log level="warning" message="Deprecated permission ACCTG_FX_ENTRY in use"/> + <else> + <property-to-field resource="CommonUiLabels" property="CommonGenericPermissionError" field-name="failMessage"/> + <set field="hasPermission" type="Boolean" value="false"/> + <field-to-result field-name="hasPermission"/> + <field-to-result field-name="failMessage"/> + </else> + </if-has-permission> + </if-compare> + </simple-method> + +</simple-methods> Modified: ofbiz/trunk/applications/accounting/servicedef/services_admin.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_admin.xml?rev=600198&r1=600197&r2=600198&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_admin.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_admin.xml Sat Dec 1 13:26:55 2007 @@ -26,18 +26,14 @@ <service name="createPartyAcctgPreference" default-entity-name="PartyAcctgPreference" engine="simple" location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="createPartyAcctgPreference" auth="true"> <description>Create accounting preferences for a party (organization)</description> - <required-permissions join-type="OR"> - <check-permission permission="ACCTG_PREF_CREATE"/> - </required-permissions> + <permission-service service-name="acctgPrefPermissionCheck" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <service name="updatePartyAcctgPreference" default-entity-name="PartyAcctgPreference" engine="simple" location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="updatePartyAcctgPreference" auth="true"> <description>Update accounting preferences for a party (organization)</description> - <required-permissions join-type="OR"> - <check-permission permission="ACCTG_PREF_UPDATE"/> - </required-permissions> + <permission-service service-name="acctgPrefPermissionCheck" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"> <!-- the following fields should not be updated because can cause big problems. @@ -64,9 +60,7 @@ <service name="updateFXConversion" engine="simple" location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="updateFXConversion"> <description>Update the conversion rate between two currencies and expire the old conversion rates</description> - <required-permissions join-type="AND"> - <check-permission permission="ACCTG_FX_ENTRY"/> - </required-permissions> + <permission-service service-name="acctgFxPermissionCheck" main-action="UPDATE"/> <attribute type="String" mode="IN" name="uomId" optional="false"/> <attribute type="String" mode="IN" name="uomIdTo" optional="false"/> <attribute type="Double" mode="IN" name="conversionFactor" optional="false"/> @@ -76,43 +70,63 @@ <service name="createGlAccountTypeDefault" engine="simple" location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="createGlAccountTypeDefault"> <description>Define a default GL account for an Account Type for a certain organisation party.</description> + <permission-service service-name="acctgPrefPermissionCheck" main-action="CREATE"/> <auto-attributes mode="IN" entity-name="GlAccountTypeDefault" include="all" optional="false"/> </service> <service name="removeGlAccountTypeDefault" engine="simple" location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="removeGlAccountTypeDefault"> <description>Remove a default GL account for an Account Type for a certain organisation party.</description> + <permission-service service-name="acctgPrefPermissionCheck" main-action="DELETE"/> <auto-attributes mode="IN" entity-name="GlAccountTypeDefault" include="pk" optional="false"/> </service> <service name="addInvoiceItemTypeGlAssignment" engine="simple" location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="addInvoiceItemTypeGlAssignment"> <description>add a override GL account number to a invoice Itemtype for a certain organisation party.</description> + <permission-service service-name="acctgPrefPermissionCheck" main-action="CREATE"/> <auto-attributes mode="IN" entity-name="InvoiceItemTypeGlAccount" include="all" optional="false"/> </service> <service name="removeInvoiceItemTypeGlAssignment" engine="simple" location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="removeInvoiceItemTypeGlAssignment"> <description>Remove a override GL account number to a invoice type for a certain organisation party.</description> + <permission-service service-name="acctgPrefPermissionCheck" main-action="DELETE"/> <auto-attributes mode="IN" entity-name="InvoiceItemTypeGlAccount" include="pk" optional="false"/> </service> <service name="addPaymentTypeGlAssignment" engine="simple" location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="addPaymentTypeGlAssignment"> <description>add a default GL account type to a payment type.</description> + <permission-service service-name="acctgPrefPermissionCheck" main-action="CREATE"/> <auto-attributes mode="IN" entity-name="PaymentGlAccountTypeMap" include="all" optional="false"/> </service> <service name="removePaymentTypeGlAssignment" engine="simple" location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="removePaymentTypeGlAssignment"> <description>Remove a default GL account type from a payment type.</description> + <permission-service service-name="acctgPrefPermissionCheck" main-action="DELETE"/> <auto-attributes mode="IN" entity-name="PaymentGlAccountTypeMap" include="pk" optional="false"/> </service> <service name="addPaymentMethodTypeGlAssignment" engine="simple" location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="addPaymentMethodTypeGlAssignment"> <description>add a default GL account number to a payment method type.</description> + <permission-service service-name="acctgPrefPermissionCheck" main-action="CREATE"/> <auto-attributes mode="IN" entity-name="PaymentMethodTypeGlAccount" include="all" optional="false"/> </service> <service name="removePaymentMethodTypeGlAssignment" engine="simple" location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="removePaymentMethodTypeGlAssignment"> <description>Remove a default GL account number from a payment method type.</description> + <permission-service service-name="acctgPrefPermissionCheck" main-action="DELETE"/> <auto-attributes mode="IN" entity-name="PaymentMethodTypeGlAccount" include="pk" optional="false"/> + </service> + + <!-- Permission services --> + <service name="acctgPrefPermissionCheck" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml" invoke="preferencePermissionCheck"> + <description>Accounting Preferences Permission Checking Logic</description> + <implements service="permissionInterface"/> + </service> + <service name="acctgFxPermissionCheck" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml" invoke="acctgFxPermissionCheck"> + <description>Accounting Foreign Exchange Permission Checking Logic</description> + <implements service="permissionInterface"/> </service> </services> Modified: ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml?rev=600198&r1=600197&r2=600198&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml Sat Dec 1 13:26:55 2007 @@ -300,7 +300,7 @@ </service> <service name="fixedAssetPermissionCheck" engine="simple" - location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="fixedAssetPermissionCheck"> + location="component://accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml" invoke="basePermissionCheck"> <description>Fixed Asset Permission Checking Logic</description> <implements service="permissionInterface"/> </service> Modified: ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml?rev=600198&r1=600197&r2=600198&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml Sat Dec 1 13:26:55 2007 @@ -359,4 +359,10 @@ <auto-attributes include="pk" mode="IN" optional="false"/> </service> + <!-- Permission services --> + <service name="basicGeneralLedgerPermissionCheck" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml" invoke="basePermissionCheck"> + <description>Basic General Ledger Permission Checking Logic</description> + <implements service="permissionInterface"/> + </service> </services> Modified: ofbiz/trunk/applications/accounting/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CommonScreens.xml?rev=600198&r1=600197&r2=600198&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/CommonScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/CommonScreens.xml Sat Dec 1 13:26:55 2007 @@ -240,36 +240,6 @@ </section> </screen> - <screen name="CommonAdminDecorator"> - <section> - <actions> - <set field="tabButtonItemTop" value="Admin"/> - <entity-one entity-name="PartyNameView" value-name="currentOrganization" auto-field-map="false"> - <field-map field-name="partyId" env-name="organizationPartyId"/> - </entity-one> - </actions> - <widgets> - <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <include-menu name="PartyAdminTabBar" location="component://accounting/widget/Menus.xml"/> - <section> - <condition> - <if-compare field-name="tabButtonItem" operator="equals" value="GlAccountAssignment"/> - </condition> - <widgets> - <include-menu name="PartyAdminAssignTabBar" location="component://accounting/widget/Menus.xml"/> - </widgets> - </section> - <container> - <label style="head1">${labelTitleProperty} ${uiLabelMap.CommonFor}: ${currentOrganization.groupName} [${organizationPartyId}]</label> - </container> - <decorator-section-include name="body"/> - </decorator-section> - </decorator-screen> - </widgets> - </section> - </screen> - <screen name="CommonPartyAccountsDecorator"> <section> <actions> Modified: ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml?rev=600198&r1=600197&r2=600198&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml Sat Dec 1 13:26:55 2007 @@ -23,8 +23,8 @@ <form name="ListCompanies" type="list" title="Internal Organizations" list-name="parties"> <field name="partyId" title="${uiLabelMap.AccountingCompanies}"><display-entity entity-name="PartyGroup" description="${groupName}"/></field> - <field name="setup" title="${uiLabelMap.CommonEmptyHeader}"><hyperlink target="AdminMain?organizationPartyId=${partyId}" description="${uiLabelMap.AccountingSetup}"/></field> - <field name="accounting" title="${uiLabelMap.CommonEmptyHeader}"><hyperlink target="PartyAccountsSummary?organizationPartyId=${partyId}" description="${uiLabelMap.AccountingAccounting}"/></field> + <field name="setup" title="${uiLabelMap.CommonEmptyHeader}" use-when="hasPrefPermission"><hyperlink target="AdminMain?organizationPartyId=${partyId}" description="${uiLabelMap.AccountingSetup}"/></field> + <field name="accounting" title="${uiLabelMap.CommonEmptyHeader}" use-when="hasBasicPermission"><hyperlink target="PartyAccountsSummary?organizationPartyId=${partyId}" description="${uiLabelMap.AccountingAccounting}"/></field> </form> <form name="ListGlAccountOrganization" list-name="listIt" target="" title="" type="list"> Modified: ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml?rev=600198&r1=600197&r2=600198&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml Sat Dec 1 13:26:55 2007 @@ -21,6 +21,36 @@ <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> + <screen name="CommonAdminDecorator"> + <section> + <actions> + <set field="tabButtonItemTop" value="Admin"/> + <entity-one entity-name="PartyNameView" value-name="currentOrganization" auto-field-map="false"> + <field-map field-name="partyId" env-name="organizationPartyId"/> + </entity-one> + </actions> + <widgets> + <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <include-menu name="PartyAdminTabBar" location="component://accounting/widget/Menus.xml"/> + <section> + <condition> + <if-compare field-name="tabButtonItem" operator="equals" value="GlAccountAssignment"/> + </condition> + <widgets> + <include-menu name="PartyAdminAssignTabBar" location="component://accounting/widget/Menus.xml"/> + </widgets> + </section> + <container> + <label style="head1">${labelTitleProperty} ${uiLabelMap.CommonFor}: ${currentOrganization.groupName} [${organizationPartyId}]</label> + </container> + <decorator-section-include name="body"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="ListCompanies"> <section> <actions> @@ -31,6 +61,14 @@ <entity-condition entity-name="PartyRole" list-name="parties"> <condition-expr field-name="roleTypeId" operator="equals" value="INTERNAL_ORGANIZATIO"/> </entity-condition> + <service service-name="acctgPrefPermissionCheck" result-map-name="permResult"> + <field-map field-name="mainAction" value="UPDATE"/> + </service> + <set field="hasPrefPermission" from-field="permResult.hasPermission"/> + <service service-name="basicGeneralLedgerPermissionCheck" result-map-name="permResult"> + <field-map field-name="mainAction" value="VIEW"/> + </service> + <set field="hasBasicPermission" from-field="permResult.hasPermission"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> @@ -53,7 +91,7 @@ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="50"/> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <include-form name="ListGlAccountOrganization" location="component://accounting/widget/GlSetupForms.xml"/> <include-form name="AssignGlAccount" location="component://accounting/widget/GlSetupForms.xml"/> @@ -89,7 +127,7 @@ </entity-condition> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <label style="head1">${uiLabelMap.AccountingOpenTimePeriods}</label> <include-form name="ListOpenTimePeriods" location="component://accounting/widget/GlSetupForms.xml"/> @@ -116,7 +154,7 @@ <entity-one entity-name="PartyAcctgPreference" value-name="partyAcctgPreference"/> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <include-form name="PartyAcctgPreference" location="component://accounting/widget/GlSetupForms.xml"/> </decorator-section> @@ -143,7 +181,7 @@ </entity-condition> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <include-form name="ListConversions" location="component://accounting/widget/GlSetupForms.xml"/> <label style="head1">${uiLabelMap.AccountingUpdateFX}</label> @@ -164,7 +202,7 @@ <entity-one entity-name="GlJournal" value-name="glJournal"/> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <include-form name="ListGlJournals" location="component://accounting/widget/GlSetupForms.xml"/> <include-form name="EditGlJournal" location="component://accounting/widget/GlSetupForms.xml"/> @@ -185,7 +223,7 @@ <set field="organizationPartyId" from-field="parameters.organizationPartyId" /> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <container> <include-form name="ListGlAccountTypeDefaults" location="component://accounting/widget/GlSetupForms.xml"/> @@ -208,7 +246,7 @@ <set field="organizationPartyId" from-field="parameters.organizationPartyId" /> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <container> <container><label style="head1">${uiLabelMap.AccountingSalesInvoiceToRevenue}</label></container> @@ -231,7 +269,7 @@ <set field="organizationPartyId" from-field="parameters.organizationPartyId" /> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <container> <container><label style="head1">Purchase Invoice type to Expense GL Account Number assignmentlist</label></container> @@ -255,7 +293,7 @@ <set field="organizationPartyId" from-field="parameters.organizationPartyId" /> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <container> <container><label style="head1">Payment type to GL Account type assignment list</label></container> @@ -277,7 +315,7 @@ <set field="organizationPartyId" from-field="parameters.organizationPartyId" /> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <container> <container><label style="head1">Payment methods to GL Account numbers assigmentlist</label></container> @@ -313,7 +351,7 @@ </entity-condition> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <container> <include-form name="ListProductGlAccounts" location="component://accounting/widget/GlSetupForms.xml"/> @@ -351,7 +389,7 @@ </entity-condition> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <container> <include-form name="ListFinAccountTypeGlAccounts" location="component://accounting/widget/GlSetupForms.xml"/> @@ -390,7 +428,7 @@ </entity-condition> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <container> <include-form name="ListProductCategoryGlAccounts" location="component://accounting/widget/GlSetupForms.xml"/> @@ -425,7 +463,7 @@ </entity-condition> </actions> <widgets> - <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonAdminDecorator"> <decorator-section name="body"> <container> <include-form name="ListVarianceReasonGlAccounts" location="component://accounting/widget/GlSetupForms.xml"/> Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=600198&r1=600197&r2=600198&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/Menus.xml (original) +++ ofbiz/trunk/applications/accounting/widget/Menus.xml Sat Dec 1 13:26:55 2007 @@ -407,9 +407,15 @@ <menu name="PartyTopTabBar" selected-menuitem-context-field-name="tabButtonItemTop" default-menu-item-name="PartyAccountsSummary" default-selected-style="selected" menu-container-style="button-bar tab-bar" type="simple"> <menu-item name="Admin" title="${uiLabelMap.AccountingSetup}"> + <condition> + <if-service-permission service-name="acctgPrefPermissionCheck" main-action="UPDATE"/> + </condition> <link target="AdminMain?organizationPartyId=${organizationPartyId}"/> </menu-item> <menu-item name="PartyAccounts" title="${uiLabelMap.AccountingAccounting}"> + <condition> + <if-service-permission service-name="basicGeneralLedgerPermissionCheck" main-action="VIEW"/> + </condition> <link target="PartyAccountsSummary?organizationPartyId=${organizationPartyId}"/> </menu-item> </menu> @@ -446,6 +452,9 @@ <link target="TimePeriods?organizationPartyId=${organizationPartyId}"/> </menu-item> <menu-item name="ViewFXConversions" title="${uiLabelMap.AccountingFX}"> + <condition> + <if-service-permission service-name="acctgFxPermissionCheck" main-action="UPDATE"/> + </condition> <link target="viewFXConversions?organizationPartyId=${organizationPartyId}"/> </menu-item> </menu> |
Free forum by Nabble | Edit this page |