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 8ef3441a7f Improved: FinAccount Screen shows create trigger to user 
with VIEW permission (OFBIZ-12567) (#703)
8ef3441a7f is described below

commit 8ef3441a7fb836c4d5a296c59eba525f67187169
Author: Pierre Smits <pierre.sm...@somonar.com>
AuthorDate: Tue Feb 27 10:21:24 2024 +0100

    Improved: FinAccount Screen shows create trigger to user with VIEW 
permission (OFBIZ-12567) (#703)
    
    When accessing 
https://localhost:8443/accounting/control/EditFinAccount?finAccountId=ABN_CHECKING
 as a user with only VIEW permissions (e.g. userid=auditor) the screen shows a 
action trigger to create something.
    This should not be visible to such a user as it leads to a undesired effect 
and diminished user experience.
    
    modified:
    - FinAccountScreens.xml - removed container having link target to create a 
new financial account
    - AccountMenus.xml - added menu-iitem to MainActionMenu for creating a new 
financial account
---
 applications/accounting/widget/AccountingMenus.xml   | 8 ++++++++
 applications/accounting/widget/FinAccountScreens.xml | 3 ---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/applications/accounting/widget/AccountingMenus.xml 
b/applications/accounting/widget/AccountingMenus.xml
index 0df94f9480..2604efa099 100644
--- a/applications/accounting/widget/AccountingMenus.xml
+++ b/applications/accounting/widget/AccountingMenus.xml
@@ -103,6 +103,14 @@ under the License.
             </condition>
             <link target="EditBillingAccount"/>
         </menu-item>
+        <menu-item name="NewFinAccount" title="${uiLabelMap.CommonCreate} 
${uiLabelMap.AccountingFinAccount}">
+            <condition>
+                <or>
+                    <if-has-permission permission="ACCOUNTING" 
action="_CREATE"/>
+                </or>
+            </condition>
+            <link target="EditFinAccount"/>
+        </menu-item>
     </menu>
 
     <menu name="AccountingShortcutAppBar" 
title="${uiLabelMap.AccountingManager}">
diff --git a/applications/accounting/widget/FinAccountScreens.xml 
b/applications/accounting/widget/FinAccountScreens.xml
index be883d85ab..3b79e26a77 100644
--- a/applications/accounting/widget/FinAccountScreens.xml
+++ b/applications/accounting/widget/FinAccountScreens.xml
@@ -59,9 +59,6 @@ under the License.
                                 <label style="h3" 
text="${uiLabelMap.AccountingViewPermissionError}"/>
                             </widgets>
                         </section>
-                        <container style="button-bar">
-                            <link target="EditFinAccount" 
text="${uiLabelMap.CommonCreate}" style="buttontext create"/>
-                        </container>
                         <decorator-section-include name="body"/>
                     </decorator-section>
                 </decorator-screen>

Reply via email to