Skip to content
Snippets Groups Projects
Commit ef0ae32d authored by lcdweb's avatar lcdweb
Browse files

CRM-13920 fix case count and activity creation perm check

parent 90319720
No related branches found
No related tags found
No related merge requests found
......@@ -2064,7 +2064,7 @@ SELECT civicrm_contact.id as casemanager_id,
static $accessibleCaseIds;
if (!is_array($accessibleCaseIds)) {
$session = CRM_Core_Session::singleton();
$accessibleCaseIds = array_keys(self::getCases(FALSE, $session->get('userID')));
$accessibleCaseIds = array_keys(self::getCases(FALSE, $session->get('userID'), 'any'));
}
//no need of further processing.
if (empty($accessibleCaseIds)) {
......
......@@ -115,7 +115,7 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity {
!CRM_Core_Permission::check('access all cases and activities')
) {
$session = CRM_Core_Session::singleton();
$allCases = CRM_Case_BAO_Case::getCases(TRUE, $session->get('userID'));
$allCases = CRM_Case_BAO_Case::getCases(TRUE, $session->get('userID'), 'any');
if (!array_key_exists($this->_caseId, $allCases)) {
CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment