Commit 6ed33f2d authored by ErikHommel's avatar ErikHommel
Browse files

add alterAPIPermissions hook

parent 37d95bac
## Version 2.4
* add alterAPIPermissions hook to skip permission check for koalect_transaction create
## Version 2.3
* retry available for all statuses apart from _processed_
......
......@@ -151,7 +151,6 @@ function _civicrm_api3_koalect_transaction_Create_spec(&$spec) {
* @throws API_Exception
*/
function civicrm_api3_koalect_transaction_Create($params) {
// temp debug during initial testing
$params['entity'] = "KoalectTransaction";
$params['action'] = "create";
$kt = new CRM_Koalecttocivi_KoalectTransaction();
......
......@@ -14,8 +14,8 @@
<url desc="Support">https://civicoop.org</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2022-06-29</releaseDate>
<version>2.3</version>
<releaseDate>2022-07-01</releaseDate>
<version>2.4</version>
<develStage>beta</develStage>
<compatibility>
<ver>5.0</ver>
......
......@@ -14,6 +14,17 @@ function koalecttocivi_civicrm_container(ContainerBuilder $container) {
$container->addCompilerPass(new Civi\Koalecttocivi\KoalectContainer());
}
/**
* Implements hook_civicrm_alterAPIPermissions()
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterAPIPermissions/
*/
function koalecttocivi_civicrm_alterAPIPermissions($entity, $action, &$params, &$permissions) {
if ($entity == 'koalect_transaction' and $action == 'create') {
$params['check_permissions'] = FALSE;
}
}
/**
* Implements hook_civicrm_navigationMenu().
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment