See parent issue #3200985: [meta] Fix undesirable access checking on entity query usages for context and test coverage policy.

Entity type delete forms should warn about any content at risk even if deleting user lacks access.

Fixes needed:
- core/modules/node/src/Form/NodeTypeDeleteConfirm.php buildForm
- core/modules/block_content/src/Form/BlockContentTypeDeleteForm.php buildForm
- core/modules/comment/src/Form/CommentTypeDeleteForm.php buildForm
- core/modules/media/src/Form/MediaTypeDeleteConfirmForm.php buildForm

In itself this is not a critical data integrity bug. It's major because it blocks #2785449: It's too easy to write entity queries with access checks that must not have them.

Issue fork drupal-3202040

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

Because this only affects a UI warning show to sitebuilders when performing a rare operation of obvious high impact, I suggest it doesn't need test coverage under our #3200985: [meta] Fix undesirable access checking on entity query usages policy despite the fact that node is one of the affected systems.

jonathanshaw’s picture

Status: Active » Needs review
longwave’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense, also agree that issue is well scoped/self contained and I don't think we need explicit test coverage.

  • catch committed aef67cd on 9.2.x
    Issue #3202040 by jonathanshaw: EntityQuery accessCheck: bundle delete...

  • catch committed 753616b on 9.1.x
    Issue #3202040 by jonathanshaw: EntityQuery accessCheck: bundle delete...
catch’s picture

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

Opened the follow-up mentioned on the MR #3202963: Bundle delete forms should use count query when warning about existing entities.

Committed aef67cd and pushed to 9.2.x. Thanks! Cherry-picked to 9.1.x.

Status: Fixed » Closed (fixed)

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