From 9198b2868984cba5811ef11eff68e6d80e424bd9 Mon Sep 17 00:00:00 2001 From: colemanw Date: Mon, 12 Jun 2023 12:21:55 -0400 Subject: [PATCH] CiviGrant - Fix error when creating grant without permissions When creating a grant with checkPermissions disabled (e.g. via API) the permissions were getting tripped by the RecentItem create action --- ext/civigrant/CRM/Grant/BAO/Grant.php | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/civigrant/CRM/Grant/BAO/Grant.php b/ext/civigrant/CRM/Grant/BAO/Grant.php index 0c9916e2db..27538b0428 100644 --- a/ext/civigrant/CRM/Grant/BAO/Grant.php +++ b/ext/civigrant/CRM/Grant/BAO/Grant.php @@ -110,6 +110,7 @@ class CRM_Grant_BAO_Grant extends CRM_Grant_DAO_Grant { $title = CRM_Contact_BAO_Contact::displayName($grant->contact_id) . ' - ' . ts('Grant') . ': ' . $grantTypes[$grant->grant_type_id]; civicrm_api4('RecentItem', 'create', [ + 'checkPermissions' => FALSE, 'values' => [ 'entity_type' => 'Grant', 'entity_id' => $grant->id, -- 2.25.1