CRM-18116 Fixing bug with editing assigned activities within case.
authorJoseph Lacey <joseph@palantetech.coop>
Mon, 6 Jun 2016 02:34:52 +0000 (20:34 -0600)
committerJoseph Lacey <joseph@palantetech.coop>
Mon, 6 Jun 2016 02:35:05 +0000 (20:35 -0600)
----------------------------------------
* CRM-18116: CiviCase Users Unable to Edit & Add Activities on Cases They've Been Assigned
  https://issues.civicrm.org/jira/browse/CRM-18116

CRM/Case/Form/Activity.php

index 9147cfb02cc31cd4f337339c1a7f658772b07010..4161112e247c364292084d9b7b05f430139cee29 100644 (file)
@@ -102,7 +102,7 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity {
     ) {
       $session = CRM_Core_Session::singleton();
       $allCases = CRM_Case_BAO_Case::getCases(TRUE, $session->get('userID'), 'any');
-      if (!array_key_exists($this->_caseId, $allCases)) {
+      if (!array_key_exists($this->_caseId[0], $allCases)) {
         CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
       }
     }