Skip to content

Commit

Permalink
Merge pull request #12613 from JMAConsulting/core-issue-297
Browse files Browse the repository at this point in the history
dev/core#297 : fix broken permission 'access my cases and activities'
  • Loading branch information
colemanw authored Aug 26, 2018
2 parents 86956fa + bf5990e commit 2ae6c17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CRM/Case/BAO/Case.php
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,8 @@ public static function getCases($allCases = TRUE, $params = array(), $context =
$mask = CRM_Core_Action::mask($permissions);

$caseTypes = CRM_Case_PseudoConstant::caseType('name');
foreach ($result->fetchAll() as $key => $case) {
foreach ($result->fetchAll() as $case) {
$key = $case['case_id'];
$casesList[$key] = array();
$casesList[$key]['DT_RowId'] = $case['case_id'];
$casesList[$key]['DT_RowAttr'] = array('data-entity' => 'case', 'data-id' => $case['case_id']);
Expand Down
2 changes: 1 addition & 1 deletion CRM/Case/Page/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public static function getCases() {
'recordsTotal' => $cases['total'],
);
unset($cases['total']);
$casesDT['data'] = $cases;
$casesDT['data'] = array_values($cases);

CRM_Utils_JSON::output($casesDT);
}
Expand Down

0 comments on commit 2ae6c17

Please sign in to comment.