From 242d4bff68f9a00513a0bdefaf65b66a54571616 Mon Sep 17 00:00:00 2001 From: colemanw Date: Tue, 28 Nov 2023 10:47:55 -0500 Subject: [PATCH] Go to bed without supper --- CRM/Activity/BAO/Activity.php | 2 +- CRM/Case/BAO/Case.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index e09b34ebd1..27596d3f28 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -2163,7 +2163,7 @@ AND cl.modified_id = c.id } // Check for target and assignee contacts. - // First check for supper permission. + // First check for super permission. $supPermission = 'view all contacts'; if ($action == CRM_Core_Action::UPDATE) { $supPermission = 'edit all contacts'; diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index 9c2e025b2c..bdd20090e2 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -2502,7 +2502,7 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')'; $actionOperations = ['view', 'edit', 'delete']; if (in_array($operation, $actionOperations)) { - //do cache when user has non/supper permission. + // Do cache when user has non-super permission. static $allowOperations; if (!is_array($allowOperations) || @@ -2546,7 +2546,7 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')'; 'edit', ]) ) { - //do we have supper permission. + // Check for super permission. if (in_array('access all cases and activities', $hasPermissions[$operation])) { $allowOperations[$operation] = $allow = TRUE; } @@ -2608,8 +2608,7 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')'; } } else { - //use cache. - //here contact might have supper/non permission. + // Use cache; user might have non-super permission. $allow = $allowOperations[$operation]; } } -- 2.25.1