elseif ($activityTypeName == 'Print PDF Letter') {
$updateUrl = 'civicrm/activity/pdf/add';
}
- $actionLinks += array(CRM_Core_Action::UPDATE => array('name' => ts('Edit'),
- 'url' => $updateUrl,
- 'qs' => $qsUpdate,
- 'title' => ts('Update Activity'),
- ));
+ if ( CRM_Activity_BAO_Activity::checkPermission($activityId, CRM_Core_Action::UPDATE) ) {
+ $actionLinks += array(CRM_Core_Action::UPDATE => array('name' => ts('Edit'),
+ 'url' => $updateUrl,
+ 'qs' => $qsUpdate,
+ 'title' => ts('Update Activity'),
+ ));
+ }
}
if (
$config = CRM_Core_Config::singleton();
if (in_array('CiviCase', $config->enableComponents)) {
- self::$_tasks[6] = array('title' => ts('File on Case'),
- 'class' => 'CRM_Activity_Form_Task_FileOnCase',
- 'result' => FALSE,
- );
+ if ( CRM_Core_Permission::check('access all cases and activities') ||
+ CRM_Core_Permission::check('access my cases and activities') ) {
+ self::$_tasks[6] = array('title' => ts('File on Case'),
+ 'class' => 'CRM_Activity_Form_Task_FileOnCase',
+ 'result' => FALSE,
+ );
+ }
}
//CRM-4418, check for delete