Skip to content

Commit

Permalink
Patch ACL multi method call
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksagona committed Dec 18, 2023
1 parent 096ed97 commit 7cf5050
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/AclForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ public function render(int $depth = 0, ?string $indent = null, bool $inner = fal
$fieldName = $field->getName();
if ($this->acl->hasResource($fieldName)) {
$viewDenied = ($this->aclStrict) ?
$this->acl->isDeniedManyStrict($this->roles, $fieldName, $this->permissions['display']) :
$this->acl->isDeniedMany($this->roles, $fieldName, $this->permissions['display']);
$this->acl->isDeniedMultiStrict($this->roles, $fieldName, $this->permissions['display']) :
$this->acl->isDeniedMulti($this->roles, $fieldName, $this->permissions['display']);

if ($viewDenied) {
unset($fieldset[$fieldName]);
} else {
$modifyDenied = ($this->aclStrict) ?
$this->acl->isDeniedManyStrict($this->roles, $fieldName, $this->permissions['modify']) :
$this->acl->isDeniedMany($this->roles, $fieldName, $this->permissions['modify']);
$this->acl->isDeniedMultiStrict($this->roles, $fieldName, $this->permissions['modify']) :
$this->acl->isDeniedMulti($this->roles, $fieldName, $this->permissions['modify']);
if ($modifyDenied) {
$field->setReadonly(true);
}
Expand Down

0 comments on commit 7cf5050

Please sign in to comment.