diff --git a/CRM/ACL/BAO/ACL.php b/CRM/ACL/BAO/ACL.php index 0df54ea93158..154b17835724 100644 --- a/CRM/ACL/BAO/ACL.php +++ b/CRM/ACL/BAO/ACL.php @@ -522,7 +522,7 @@ protected static function loadPermittedIDs(int $contactID, string $tableName, in * * @return array */ - private function loadDenyIDs(int $contactID, string $tableName, int $type, $allGroups): array { + private static function loadDenyIDs(int $contactID, string $tableName, int $type, $allGroups): array { $ids = []; $acls = CRM_ACL_BAO_Cache::build($contactID); $aclKeys = array_keys($acls); diff --git a/CRM/ACL/Form/ACL.php b/CRM/ACL/Form/ACL.php index 53a27516e9f8..3f10f73e0266 100644 --- a/CRM/ACL/Form/ACL.php +++ b/CRM/ACL/Form/ACL.php @@ -160,7 +160,7 @@ public function buildQuickForm() { $this->add('select', 'event_id', ts('Event'), $event); $this->add('checkbox', 'is_active', ts('Enabled?')); - $this->add('advcheckbox', 'deny', ts('Negate access'); + $this->add('advcheckbox', 'deny', ts('Negate access')); $this->addFormRule(['CRM_ACL_Form_ACL', 'formRule']); } @@ -254,7 +254,6 @@ public function postProcess() { else { $params = $this->controller->exportValues($this->_name); $params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE); - $params['deny'] = 0; $params['entity_table'] = 'civicrm_acl_role'; // Figure out which type of object we're permissioning on and set object_table and object_id. diff --git a/CRM/ACL/Page/ACL.php b/CRM/ACL/Page/ACL.php index 62ce735f4e95..0e2a7638a83f 100644 --- a/CRM/ACL/Page/ACL.php +++ b/CRM/ACL/Page/ACL.php @@ -133,6 +133,7 @@ public function browse() { $acl[$dao->id]['object_table'] = $dao->object_table; $acl[$dao->id]['object_id'] = $dao->object_id; $acl[$dao->id]['is_active'] = $dao->is_active; + $acl[$dao->id]['deny'] = $dao->deny; if ($acl[$dao->id]['entity_id']) { $acl[$dao->id]['entity'] = $roles[$acl[$dao->id]['entity_id']] ?? NULL; diff --git a/templates/CRM/ACL/Form/ACL.tpl b/templates/CRM/ACL/Form/ACL.tpl index f27f8974bde9..583be52ac03a 100644 --- a/templates/CRM/ACL/Form/ACL.tpl +++ b/templates/CRM/ACL/Form/ACL.tpl @@ -32,7 +32,7 @@ {$form.operation.label} {$form.operation.html}
- {ts}What type of operation (action) is being permitted?{/ts} + {ts}What type of operation (action) is being referenced?{/ts} @@ -45,6 +45,10 @@
{ts}IMPORTANT: The Drupal permissions for 'access all custom data' and 'profile listings and forms' override and disable specific ACL settings for custom field groups and profiles respectively. Do not enable those Drupal permissions for a Drupal role if you want to use CiviCRM ACL's to control access.{/ts}
{/if} + + {$form.deny.label} + {$form.deny.html} +
diff --git a/templates/CRM/ACL/Page/ACL.tpl b/templates/CRM/ACL/Page/ACL.tpl index d1e07327ce0a..d5e73c326129 100644 --- a/templates/CRM/ACL/Page/ACL.tpl +++ b/templates/CRM/ACL/Page/ACL.tpl @@ -30,6 +30,7 @@ + @@ -42,6 +43,7 @@ + {/foreach}
{ts}Which Data{/ts} {ts}Description{/ts} {ts}Enabled?{/ts}{ts}Negate?{/ts}
{$row.object} {$row.name} {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.deny eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {$row.action|replace:'xx':$aclID}