Node access breaks entity queries with 'OR' conjunction

Created on 27 July 2020, over 4 years ago
Updated 29 May 2024, 7 months ago

If I create an entity query with an 'OR' conjunction, like `$nodeStorage->getQuery('OR');`, then extra nodes will be added to the result.

The reason for this is because `->accessCheck()` is enabled by default, and in `NodeGrantDatabaseStorage::alterQuery()`, the subquery will be added to the main query object assuming an 'AND' conjunction.

🐛 Bug report
Status

Closed: works as designed

Version

11.0 🔥

Component
Node system 

Last updated 4 days ago

No maintainer
Created by

🇭🇺Hungary tamasd

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024