CRM-18049 - Backport api campaign permissions
authorColeman Watts <coleman@civicrm.org>
Tue, 16 Feb 2016 22:51:07 +0000 (17:51 -0500)
committerColeman Watts <coleman@civicrm.org>
Tue, 16 Feb 2016 22:51:07 +0000 (17:51 -0500)
CRM/Core/DAO/permissions.php

index 66012a56b1d4cdce910eb4163e19d42c7b2f1ef6..44420d70b459c3843e93f8a0b72cf28cc6536962 100644 (file)
@@ -167,6 +167,16 @@ function _civicrm_api3_permissions($entity, $action, &$params) {
     ),
   );
 
+  // Campaign permissions
+  $permissions['campaign'] = array(
+    'get' => array('access CiviCRM'),
+    'default' => array(
+      // nested array = OR
+      array('administer CiviCampaign', 'manage campaign'),
+    ),
+  );
+  $permissions['survey'] = $permissions['campaign'];
+
   // Financial permissions
   $permissions['contribution'] = array(
     'get' => array(