$components = CRM_Core_Component::getNames();
$componentClause = array();
foreach ($components as $componentID => $componentName) {
- // CRM-19201: Add support for reporting CiviCampaign activities
- // For CiviCase, "access all cases and activities" is required here
- // rather than "access my cases and activities" to prevent those with
- // only the later permission from seeing a list of all cases which might
- // present a privacy issue.
+ // CRM-19201: Add support for searching CiviCampaign and CiviCase
+ // activities. For CiviCase, "access all cases and activities" is
+ // required here rather than "access my cases and activities" to
+ // prevent those with only the later permission from seeing a list
+ // of all cases which might present a privacy issue.
if (!CRM_Core_Permission::access($componentName, TRUE, TRUE)) {
$componentClause[] = " (activity_type.component_id IS NULL OR activity_type.component_id <> {$componentID}) ";
}