From: jitendrapurohit Date: Thu, 16 Jul 2015 06:39:44 +0000 (+0530) Subject: additional fix for CRM-16776 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=380a8fc706c7f17c7b99f1e486ed8ddfe942eb76;p=civicrm-core.git additional fix for CRM-16776 --- diff --git a/CRM/Contribute/Form/ContributionPage/Custom.php b/CRM/Contribute/Form/ContributionPage/Custom.php index ff76aaaa46..ea730d09f2 100644 --- a/CRM/Contribute/Form/ContributionPage/Custom.php +++ b/CRM/Contribute/Form/ContributionPage/Custom.php @@ -98,6 +98,9 @@ class CRM_Contribute_Form_ContributionPage_Custom extends CRM_Contribute_Form_Co CRM_Utils_System::setTitle(ts('Include Profiles') . " ($title)"); } + if (CRM_Core_Permission::check('administer CiviCRM')) { + $this->assign('perm', 1); + } $ufJoinParams = array( 'module' => 'CiviContribute', 'entity_table' => 'civicrm_contribution_page', diff --git a/CRM/Core/DAO/permissions.php b/CRM/Core/DAO/permissions.php index 661570ab62..bdce46cd46 100644 --- a/CRM/Core/DAO/permissions.php +++ b/CRM/Core/DAO/permissions.php @@ -478,19 +478,28 @@ function _civicrm_api3_permissions($entity, $action, &$params) { $permissions['uf_group'] = array( 'create' => array( - 'access CiviCRM', - 'manage event profiles', + array( + 'administer CiviCRM', + 'manage event profiles', + ), ), 'get' => array( 'access CiviCRM', ), 'update' => array( - 'access CiviCRM', - 'manage event profiles', + array( + 'administer CiviCRM', + 'manage event profiles', + ), ), ); $permissions['uf_field'] = $permissions['uf_group']; - $permissions['uf_field']['delete'] = array('access CiviCRM', 'manage event profiles'); + $permissions['uf_field']['delete'] = array( + array( + 'administer CiviCRM', + 'manage event profiles', + ), + ); $permissions['option_value'] = $permissions['uf_group']; $permissions['option_group'] = $permissions['option_value'];