Author: hansbak
Date: Thu Jul  5 03:07:58 2012
New Revision: 1357450

URL: http://svn.apache.org/viewvc?rev=1357450&view=rev
Log:
update revision 1352768 to use CREATE instead of ADMIN, suggestion from Jacopo

Modified:
    
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
    ofbiz/trunk/applications/accounting/webapp/accounting/payment/manualTx.ftl
    ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml

Modified: 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=1357450&r1=1357449&r2=1357450&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
 (original)
+++ 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
 Thu Jul  5 03:07:58 2012
@@ -2995,7 +2995,7 @@ public class PaymentGatewayServices {
         Security security = dctx.getSecurity();
 
         // security check
-        if (!security.hasEntityPermission("MANUAL", "_PAYMENT", userLogin) && 
!security.hasEntityPermission("ACCOUNTING", "_ADMIN", userLogin)) {
+        if (!security.hasEntityPermission("MANUAL", "_PAYMENT", userLogin) && 
!security.hasEntityPermission("ACCOUNTING", "_CREATE", userLogin)) {
             Debug.logWarning("**** Security [" + (new Date()).toString() + "]: 
" + userLogin.get("userLoginId") + " attempt to run manual payment 
transaction!", module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
                     "AccountingPaymentTransactionNotAuthorized", locale));
@@ -3130,7 +3130,7 @@ public class PaymentGatewayServices {
         Delegator delegator = dctx.getDelegator();
         Security security = dctx.getSecurity();
         // security check
-        if (!security.hasEntityPermission("MANUAL", "_PAYMENT", userLogin) && 
!security.hasEntityPermission("ACCOUNTING", "_ADMIN", userLogin)) {
+        if (!security.hasEntityPermission("MANUAL", "_PAYMENT", userLogin) && 
!security.hasEntityPermission("ACCOUNTING", "_CREATE", userLogin)) {
             Debug.logWarning("**** Security [" + (new Date()).toString() + "]: 
" + userLogin.get("userLoginId") + " attempt to run manual payment 
transaction!", module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
                     "AccountingPaymentTransactionNotAuthorized", locale));

Modified: 
ofbiz/trunk/applications/accounting/webapp/accounting/payment/manualTx.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/payment/manualTx.ftl?rev=1357450&r1=1357449&r2=1357450&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/payment/manualTx.ftl 
(original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/payment/manualTx.ftl 
Thu Jul  5 03:07:58 2012
@@ -20,7 +20,7 @@ under the License.
 <h1>${uiLabelMap.AccountingManualTransaction}</h1>
 <br />
 
-<#if security.hasEntityPermission("MANUAL", "_PAYMENT", session) || 
security.hasEntityPermission("ACCOUNTING", "_ADMIN", session)>
+<#if security.hasEntityPermission("MANUAL", "_PAYMENT", session) || 
security.hasEntityPermission("ACCOUNTING", "_CREATE", session)>
   ${setRequestAttribute("validTx", "false")}
   <form name="manualTxForm" method="post" 
action="<@ofbizUrl>manualETx</@ofbizUrl>">
     <#if requestParameters.paymentMethodId?exists>

Modified: ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml?rev=1357450&r1=1357449&r2=1357450&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml Thu Jul  5 
03:07:58 2012
@@ -28,8 +28,8 @@ under the License.
         <menu-item name="transaction" 
title="${uiLabelMap.AccountingTransactions}">
             <condition>
                 <or>
-                <if-has-permission permission="MANUAL" action="_PAYMENT"/>
-                <if-has-permission permission="ACCOUNTING" action="_ADMIN"/>
+                    <if-has-permission permission="MANUAL" action="_PAYMENT"/>
+                    <if-has-permission permission="ACCOUNTING" 
action="_CREATE"/>
                 </or>
             </condition>
             <link target="FindGatewayResponses"/>


Reply via email to