Hello, thank you for your module, but I ran into issues with access permission when entity type is using Layout Builder. Problem is that every core block check for access separately. Fields are hidden from anonymous users.
FieldBlock.php
protected function blockAccess(AccountInterface $account) {
$entity = $this->getEntity();
// First consult the entity.
$access = $entity->access('view', $account, TRUE);
if (!$access->isAllowed()) {
return $access;
}
}
Any idea how to solve this?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | public_preview-3089615-4.patch | 1.2 KB | dj1999 |
Comments
Comment #2
parisekI found https://www.drupal.org/project/access_unpublished/ which works great with Layout Builder
Comment #3
dj1999 commentedHere the patch please review it.
Comment #4
dj1999 commentedComment #5
mhavelant commentedLooks good, thanks!
Comment #7
mhavelant commentedAdded to beta2, thanks!