Changes to CRM/Report/Form/Activity.php regarding Civicase permissions
authorcircleinteractive <clare@bishop-brennan.circle-interactive.co.uk>
Thu, 18 Feb 2016 11:30:43 +0000 (11:30 +0000)
committercircleinteractive <clare@bishop-brennan.circle-interactive.co.uk>
Thu, 18 Feb 2016 11:30:43 +0000 (11:30 +0000)
CRM/Report/Form/Activity.php

index 84bc5ea730eeaf236f897703efb467c4a9b3e109..33c10cac85ad0b1977766167024520c87535e547 100644 (file)
@@ -59,7 +59,8 @@ class CRM_Report_Form_Activity extends CRM_Report_Form {
 
     $components = CRM_Core_Component::getEnabledComponents();
     foreach ($components as $componentName => $componentInfo) {
-      if (CRM_Core_Permission::check("access $componentName")) {
+      $permission = sprintf("access %s", $componentName == 'CiviCase' ? "all cases and activities" : $componentName);
+      if (CRM_Core_Permission::check($permission)) {
         $accessAllowed[] = $componentInfo->componentID;
       }
     }