CRM-16274 - Change permission for Add Contacts to Groups in reports to be the same...
authorDave Greenberg <dave@civicrm.org>
Mon, 28 Sep 2015 02:19:26 +0000 (22:19 -0400)
committerDave Greenberg <dave@civicrm.org>
Mon, 28 Sep 2015 02:19:26 +0000 (22:19 -0400)
----------------------------------------
* CRM-16274: Change the permission required for 'Add Contacts to Group' in reports to be consistent with other workflows
  https://issues.civicrm.org/jira/browse/CRM-16274

CRM/Report/Form.php

index 44c8981cfdf35c4360ea7f97f9b26d8b12a07d13..c7fea92b59755ca962ebe4f125fa5464e24fcb5c 100644 (file)
@@ -1409,7 +1409,9 @@ class CRM_Report_Form extends CRM_Core_Form {
       $this->addElement('submit', $this->_csvButtonName, $label);
     }
 
-    if (CRM_Core_Permission::check('administer Reports') &&
+    // CRM-16274 Determine if user has 'edit all contacts' or equivalent
+    $permission = CRM_Core_Permission::getPermission();
+    if ($permission == CRM_Core_Permission::EDIT &&
       $this->_add2groupSupported
     ) {
       $this->addElement('select', 'groups', ts('Group'),