Inherit current unpublished access by all entities on the page

Created on 11 February 2019, almost 6 years ago
Updated 21 June 2023, over 1 year ago

Problem/Motivation

When viewing an entity with an access unpublished token we want that the whole content the entity has is displayed. This includes all kind of content being embeded by that entity. In this case that might be entity references or entities displayed in blocks. These other entities might not have been published yet. However when reviewing the main entity it is desirable that the whole page is shown properly.

Steps to reproduce

1. Create an entity with an entity reference and configure the entity reference to be displayed as part of the main entity.
2. Create an access unpublished token for the main entity.
3. Visit the view page of the main entity with the token url and observe that the referenced entity is not displyed.

Proposed resolution

Inherit the unpublished access of the main entity for all other entities being displayed on the current page.

Remaining tasks

Review the patch.

User interface changes

All unpublished entities will be shown on the page if the main entity is being visited through an access unpublished url.

API changes

None.

Data model changes

None.

Feature request
Status

RTBC

Version

1.0

Component

Code

Created by

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.

  • 🇬🇧United Kingdom smaz England, UK

    I've been using the patch from #7 for a couple of months on a production site without issue.

    I was having problems where entities from the paragraphs module wouldn't be shown on a preview, but that all works after this patch.

    Patch looks ok to me, unless this should be a setting to allow it or something? Marking as RTBC for now though!

Production build 0.71.5 2024