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 ab0e849  Fixed: VIEW permissions - error when accessing 
IncomeStatement (OFBIZ-12421) (#369)
ab0e849 is described below

commit ab0e8495b2a60eefd01fe555df1204cba5e5c7f7
Author: Pierre Smits <[email protected]>
AuthorDate: Mon Nov 29 19:50:27 2021 +0100

    Fixed: VIEW permissions - error when accessing IncomeStatement 
(OFBIZ-12421) (#369)
    
    When a user with VIEW permissions (e.g. auditor) access the IncomeStatement 
via following uri, an error is shown.
    
https://demo-trunk.ofbiz.apache.org/accounting/control/IncomeStatement?organizationPartyId=Company
    {code:java}
    java.lang.IllegalArgumentException: Error calling service with name 
getPartyAccountingPreferences: org.apache.ofbiz.service.ServiceAuthException: 
You haven't the permission for the service getPartyAccountingPreferences, 
reason : Access refused{code}
    
    Modified AccountingDemoData.xml
    added SecurityGroupPermission record
---
 applications/datamodel/data/demo/AccountingDemoData.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/applications/datamodel/data/demo/AccountingDemoData.xml 
b/applications/datamodel/data/demo/AccountingDemoData.xml
index 2b87895..1909d92 100644
--- a/applications/datamodel/data/demo/AccountingDemoData.xml
+++ b/applications/datamodel/data/demo/AccountingDemoData.xml
@@ -62,6 +62,7 @@ under the License.
     <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" 
groupId="BIZADMIN" permissionId="ACCTG_PREF_UPDATE"/>
     <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" 
groupId="BIZADMIN" permissionId="ACCTG_PREF_DELETE"/>
     <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" 
groupId="BIZADMIN" permissionId="ACCTG_PREF_VIEW"/>
+    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" 
groupId="VIEWADMIN" permissionId="ACCTG_PREF_VIEW"/>
 
     <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" 
groupId="FULLADMIN" permissionId="ACCTG_FX_UPDATE"/>
     <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" 
groupId="BIZADMIN" permissionId="ACCTG_FX_UPDATE"/>

Reply via email to