getReferencedEntityFromField add access check argument

Created on 2 October 2024, 6 months ago

Problem/Motivation

When we have access hook that forbids access to certain entity for anonymous user, but we still need to process those nodes from code, calling "getReferencedEntityFromField" fails to get field value as code has view access check by default.

Steps to reproduce

Add node bundle access forbidden to hook access for anonymous and try to get node field with getReferencedEntityFromField.

Proposed resolution

We add another argument to the function to allow developers to define access explicitly.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇷🇸Serbia miksha

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024