From 7fa5bb16b971152d6874f36d92e8df9b8a4a1b27 Mon Sep 17 00:00:00 2001 From: Joseph Lacey Date: Mon, 6 Jun 2016 11:00:49 -0600 Subject: [PATCH] Including all users for case permission check --- CRM/Case/Form/Activity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Case/Form/Activity.php b/CRM/Case/Form/Activity.php index 4161112e24..bac8f22305 100644 --- a/CRM/Case/Form/Activity.php +++ b/CRM/Case/Form/Activity.php @@ -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[0], $allCases)) { + if (count(array_intersect($this->_caseId, array_keys($allCases))) == 0) { CRM_Core_Error::fatal(ts('You are not authorized to access this page.')); } } -- 2.25.1