From 380a8fc706c7f17c7b99f1e486ed8ddfe942eb76 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Thu, 16 Jul 2015 12:09:44 +0530 Subject: [PATCH] additional fix for CRM-16776 --- .../Form/ContributionPage/Custom.php | 3 +++ CRM/Core/DAO/permissions.php | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) 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']; -- 2.25.1