CRM-12882 - Payment Processor passwords should be better hidden
authorDonald A. Lobo <lobo@civicrm.org>
Thu, 16 Jan 2014 21:41:38 +0000 (13:41 -0800)
committerDonald A. Lobo <lobo@civicrm.org>
Thu, 16 Jan 2014 21:41:38 +0000 (13:41 -0800)
http://issues.civicrm.org/jira/browse/CRM-12882

CRM/Admin/Form/PaymentProcessor.php
CRM/Core/Permission.php
CRM/Core/xml/Menu/Admin.xml

index d9c8f4d11a3cdd438cdf50ad3006e7461ff15638..39832402c93f417ae4782d6bf1d2743f873cd2b4 100644 (file)
@@ -47,6 +47,9 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form {
   protected $_ppDAO;
 
   function preProcess() {
+    if(!CRM_Core_Permission::check('administer payment processors')) {
+      CRM_Core_Error::fatal('You do not have permission to administer payment processors');
+    }
     parent::preProcess();
 
     CRM_Utils_System::setTitle(ts('Settings - Payment Processor'));
index 4f75345e49bfa11234b646f0703446899a045bb4..7d9cebd1d29305ed10fa6aa76b707eeef9b231b3 100644 (file)
@@ -552,6 +552,7 @@ class CRM_Core_Permission {
       'delete all manual batches' => $prefix . ts('delete all manual batches'),
       'export own manual batches' => $prefix . ts('export own manual batches'),
       'export all manual batches' => $prefix . ts('export all manual batches'),
+      'administer payment processors' => $prefix . ts('administer payment processors'),
     );
 
     return $permissions;
index c24d3ded1c2ad6f70919ac61ba5fe54e2da97ec8..9d6d9a2ea1a0f3d91a59ca6a9c3a16c9b1369332 100644 (file)
      <desc>Payment Processor setup for CiviCRM transactions</desc>
      <page_callback>CRM_Admin_Page_PaymentProcessor</page_callback>
      <adminGroup>System Settings</adminGroup>
+     <access_arguments>administer payment processors</access_arguments>
      <icon>admin/small/online_contribution_pages.png</icon>
      <weight>30</weight>
   </item>