3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 class CRM_Utils_Check_Component_FinancialTypeAcls
extends CRM_Utils_Check_Component
{
20 * @return CRM_Utils_Check_Message[]
21 * @throws CiviCRM_API3_Exception
23 public static function checkFinancialAclReport() {
25 $ftAclSetting = Civi
::settings()->get('acl_financial_type');
26 $financialAclExtension = civicrm_api3('extension', 'get', ['key' => 'biz.jmaconsulting.financialaclreport', 'sequential' => 1]);
27 if ($ftAclSetting && (($financialAclExtension['count'] == 1 && $financialAclExtension['values'][0]['status'] != 'installed') ||
$financialAclExtension['count'] !== 1)) {
28 $messages[] = new CRM_Utils_Check_Message(
30 ts('CiviCRM will in the future require the extension %1 for CiviCRM Reports to work correctly with the Financial Type ACLs. The extension can be downloaded <a href="%2">here</a>', [
31 1 => 'biz.jmaconsulting.financialaclreport',
32 2 => 'https://github.com/JMAConsulting/biz.jmaconsulting.financialaclreport',
34 ts('Extension Missing'),
35 \Psr\Log\LogLevel
::WARNING
,