additional fix for CRM-16776
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Thu, 16 Jul 2015 06:39:44 +0000 (12:09 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Thu, 16 Jul 2015 06:39:44 +0000 (12:09 +0530)
CRM/Contribute/Form/ContributionPage/Custom.php
CRM/Core/DAO/permissions.php

index ff76aaaa46474d6f1eccab1aeb2c20abbf8b9b47..ea730d09f261adb10463eee9e91ff8f44b15c584 100644 (file)
@@ -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',
index 661570ab62c015fe4b8394aa42c8097f042f43f2..bdce46cd467d98f60303fd4575a75a1eed3f141f 100644 (file)
@@ -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'];