From 6ca01d2a287af2ec49a06af7c01b29c997951fb4 Mon Sep 17 00:00:00 2001
From: Jaap Jansma <jaap.jansma@civicoop.org>
Date: Tue, 13 Aug 2024 15:50:12 +0200
Subject: [PATCH] Fixed issue with API permissions.

---
 CHANGELOG.md      | 4 +++-
 dataprocessor.php | 2 +-
 info.xml          | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd5193b5..3130e73a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,6 @@
-# Version 1.112 (not yet released)
+# Version 1.112
+
+* Fixed issue with API permissions.
 
 # Version 1.111
 
diff --git a/dataprocessor.php b/dataprocessor.php
index e5b2bfc1..a351ec12 100644
--- a/dataprocessor.php
+++ b/dataprocessor.php
@@ -79,7 +79,7 @@ function dataprocessor_civicrm_alterAPIPermissions($entity, $action, &$params, &
   foreach($config->getParameter('api3_permissions') as $e => $actions) {
     if (strtolower(($e)) == strtolower($entityCamelCase)) {
       foreach ($actions as $a => $p) {
-        if (strtolower($actionCamelCase) == strtolower($a)) {
+        if (strtolower($actionCamelCase) == strtolower($a) || strtolower($api_action) == strtolower($a)) {
           $permissions[$entity][$action] = $p;
         }
       }
diff --git a/info.xml b/info.xml
index 8390f5d3..34cd6161 100644
--- a/info.xml
+++ b/info.xml
@@ -14,8 +14,8 @@
     <url desc="Documentation">https://lab.civicrm.org/extensions/dataprocessor/blob/master/README.md</url>
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
-  <releaseDate>2024-08-08</releaseDate>
-  <version>1.112-dev</version>
+  <releaseDate>2024-08-13</releaseDate>
+  <version>1.112</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.37</ver>
-- 
GitLab