Fix for #22685 financial acl aggression
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 10 Feb 2022 02:20:50 +0000 (15:20 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 10 Feb 2022 02:20:50 +0000 (15:20 +1300)
Just realised this is required to make #22685 non-changey

ext/financialacls/financialacls.php

index 2c969f8a51ae8c9b5ca1601cf817cd68e411e329..d87f4eb9a56e8f20ae468bf33948a71ea8eea1ff 100644 (file)
@@ -404,6 +404,9 @@ function financialacls_toggle() {
  * @param array $menu
  */
 function financialacls_civicrm_alterMenu(array &$menu): void {
+  if (!financialacls_is_acl_limiting_enabled()) {
+    return;
+  }
   $menu['civicrm/admin/financial/financialType']['access_arguments'] = [['administer CiviCRM Financial Types']];
 }