See parent issue #3200985: [meta] Fix undesirable access checking on entity query usages for context and test coverage policy. This issue is major because it blocks #2785449: It's too easy to write entity queries with access checks that must not have them.

The MenuLinkContentDeriver::getDerivativeDefinitions uses an entity query that implicitly checks access for the current user, when it should not.

Issue fork drupal-3204138

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonathanshaw created an issue. See original summary.

jonathanshaw’s picture

I suggest that under the parent issue's test coverage policy it is acceptable for this not to have test coverage, because it would require unusual customisations to encounter and it's more important to progress the blocked issue.

jonathanshaw’s picture

Status: Active » Needs review
longwave’s picture

Status: Needs review » Reviewed & tested by the community

This seems to be the only entity query for menu_link_content. Agree that the deriver should not perform any access checks, and that test coverage is non trivial to write and probably unnecessary here.

  • catch committed 9a39ec7 on 9.2.x
    Issue #3204138 by jonathanshaw, longwave: EntityQuery accessCheck:...

  • catch committed 859109f on 9.1.x
    Issue #3204138 by jonathanshaw, longwave: EntityQuery accessCheck:...
catch’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.