Add BAO function and hook for checkAccess
authoreileen <emcnaughton@wikimedia.org>
Sun, 11 Apr 2021 20:22:52 +0000 (08:22 +1200)
committerTim Otten <totten@civicrm.org>
Mon, 7 Jun 2021 03:18:52 +0000 (20:18 -0700)
commit9cef60668e2373de629f43d8c32c9c8a16964b18
treeb4ad05a1e627d6b79bc656629de51c629d8eea01
parentd291b3694deaaa4d3c220b300d7b213f1b833afd
Add BAO function and hook for checkAccess

This adds a static ::checkAccess function to all BAOs, which dispatches to
a protected _checkAccess function in that BAO, as well as a new hook:
hook_civicrm_checkAccess($entity, $action, $record, $contactID, &$granted)
CRM/Core/DAO.php
CRM/Core/DAO/AllCoreTables.php
CRM/Financial/BAO/FinancialType.php
CRM/Utils/Hook.php
api/v3/Contribution.php
ext/financialacls/financialacls.php
tests/phpunit/api/v3/FinancialTypeACLTest.php