Allow saving pre-existing references to inaccessible items

Created on 18 September 2017, almost 8 years ago
Updated 24 July 2025, 10 days ago

Follow-up to #2791269: Allow saving pre-existing references to inaccessible items

Steps to reproduce

  • Create a content type with an entity reference field, able to reference the same content type.
  • Create an unpublished node.
  • Create another node referencing the unpublished node.
  • Give a test user access to edit all content of that type, but not view unpublished content.
  • As the test user, edit the second node. Notice the reference field says “- Restricted access - (1)”
  • Try saving the node, get an “This entity (node: 1) cannot be referenced.” error. The only way it can be saved is to remove the reference.

Possible solutions

  • Hide the inaccessible reference completely from the form. The user won’t really know about or be able to delete the reference.
  • Bypass access checking when validating unchanged references.
🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇨🇦Canada jibran Toronto, Canada

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

Merge Requests

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