accessCheck() issue on subEntityBase list builder

Created on 13 April 2023, over 1 year ago
Updated 25 August 2023, about 1 year ago

Problem/Motivation

I have a custom entity which extends subEntityBase. When I add content to this entity and try to access the content list via the administration (the list builder), then I got this error: Entity queries must explicitly set whether the query should be access checked or not.

Steps to reproduce

- Create a custom entity which extends subEntityBase
- Define the list builder of this entity "Drupal\subentity\Entity\Controller\ReferencedEntityListBuilder"
- Create a content with this entity
- Try to access to the content list

Proposed resolution

I propose to add an access control on the request which is done in the list builder

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇫🇷France bakop Lille

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

Comments & Activities

Production build 0.71.5 2024