This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 188ae8795c Improved: Biling Account Payment - VIEW Permissions (#509)
188ae8795c is described below

commit 188ae8795c7d33ca7b73a9c559c3fe6e3185bf5c
Author: Pierre Smits <pierre.sm...@orrtiz.com>
AuthorDate: Fri May 13 09:58:18 2022 +0200

    Improved: Biling Account Payment - VIEW Permissions (#509)
    
    When accessing
    
[https://localhost:8443/accounting/control/BillingAccountPayments?billingAccountId=9010]
    as a user with only VIEW permissions (e.g. userid=auditor),
    the screen shows a form to create a payment.
    This should not be visible to such a user as it leads
    to a undesired effect and diminished user experience.
    
    modified: BillingAccountScreens.xml
    reworked screen BillingAccountPayments to work with
    CREATE permissions
---
 applications/accounting/widget/BillingAccountScreens.xml | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/applications/accounting/widget/BillingAccountScreens.xml 
b/applications/accounting/widget/BillingAccountScreens.xml
index f4d1f6ec8c..836fe0f7f8 100644
--- a/applications/accounting/widget/BillingAccountScreens.xml
+++ b/applications/accounting/widget/BillingAccountScreens.xml
@@ -305,9 +305,16 @@ under the License.
             <widgets>
                 <decorator-screen name="CommonBillingAccountDecorator" 
location="${parameters.billingAccountDecoratorLocation}">
                     <decorator-section name="body">
-                        <screenlet id="BillingAccountPaymentPanel" 
title="${uiLabelMap.AccountingCreatePayment}" collapsible="true">
-                            <include-form 
name="CreateIncomingBillingAccountPayment" 
location="component://accounting/widget/BillingAccountForms.xml"/>
-                        </screenlet>
+                        <section>
+                            <condition>
+                                <if-has-permission permission="ACCOUNTING" 
action="CREATE"/>
+                            </condition>
+                            <widgets>
+                                <screenlet id="BillingAccountPaymentPanel" 
title="${uiLabelMap.AccountingCreatePayment}" collapsible="true">
+                                    <include-form 
name="CreateIncomingBillingAccountPayment" 
location="component://accounting/widget/BillingAccountForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                        </section>
                         <include-grid name="ListBillingAccountPayments" 
location="component://accounting/widget/BillingAccountForms.xml"/>
                     </decorator-section>
                 </decorator-screen>

Reply via email to