Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291388

User can't reference unpublished content even when they have access to it

$
0
0

Problem/Motivation

User gets an error when trying to reference an unpublished entity that they have just created and that he has full access to. This basically makes it impossible for a user to submit a set of unpublished interreferencing entities (e.g. artefact/architect/city).

Steps to reproduce:

  1. Create content type A, make sure Published is unchecked in the Publishing options.
  2. Create content type B, add an ER field referencing A, choose Autocomplete widget in Form display.
  3. Create a test user, give permissions to View own unpublished content, to Create A and B, to Edit own A and B.
  4. Log in as that user.
  5. Create a test node of type A, verify that it is Unpublished and the user can see it.
  6. Create a test node of type B, start typing the label of the A node just created, verify that it's not recognised and suggested by the system.
  7. Type the complete label and hit Save, get the "No such entity" error.
  8. Type the entity label followed by its nid in parentheses, still get the "This entity (node: N) cannot be referenced”

This issue also prevents the user w/ appropriate permissions from referencing unpublished entities authored by other users.

Proposed resolution

Allow referencing unpublished entities if the current user has access to them.

To implement that:
- We are adding a flag in selection handler plugin
- Based on the flag values we are checking additional permissions and allowing users to check the node

Solution approach is based on #80#82#83

Remaining tasks

- Needs review
- UX review if configured option labels isn't confusing

User interface changes

Additional option is added on the selection handler plugin settings

API changes

none

Data model changes

none

Release notes snippet


Viewing all articles
Browse latest Browse all 291388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>