From fb20af660cedb1520d512b55f825b67a82062521 Mon Sep 17 00:00:00 2001 From: colemanw Date: Wed, 29 Nov 2023 17:02:41 -0500 Subject: [PATCH] Api - Fix premium & product permissions for anonymous users --- CRM/Core/Permission.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Permission.php b/CRM/Core/Permission.php index 72a7fd80b5..924da60561 100644 --- a/CRM/Core/Permission.php +++ b/CRM/Core/Permission.php @@ -1153,7 +1153,10 @@ class CRM_Core_Permission { ]; $permissions['line_item'] = $permissions['contribution']; $permissions['product'] = $permissions['premiums'] = $permissions['premiums_product'] = $permissions['contribution']; - $permissions['product']['get'] = $permissions['premiums']['get'] = $permissions['premiums_product']['get'] = [['access CiviCRM', 'access CiviContribute', 'make online contributions']]; + // Add 'make online contributions' permissions to allow anon users to access these entities + // (permissions are controlled by financial ACLs) + $permissions['product']['get'] = $permissions['premium']['get'] = $permissions['premiums_product']['get'] = [['access CiviCRM', 'access CiviContribute', 'make online contributions']]; + $permissions['product']['meta'] = $permissions['premium']['meta'] = $permissions['premiums_product']['meta'] = [['access CiviCRM', 'access CiviContribute', 'make online contributions']]; $permissions['financial_item'] = $permissions['contribution']; $permissions['financial_type']['get'] = $permissions['contribution']['get']; -- 2.25.1