Updated: Comment #0

Problem/Motivation

Steps to reproduce:
1. Create one unpublised article
2. Edit the frontpage view and add "Rendered entity - Content" to header area
3. Set the ID value to the nid of article created in step 1 and check "Display even if view has no result".
4. Save the view and logout
5. Node is rendered on front page

Proposed resolution

Remaining tasks

User interface changes

API changes

Comments

dealancer’s picture

This could be fixed by adding a checkbox setting "Check content access" in the "Rendered entity - Content" settings form. Similar checkboxes could be added to any "Rendered entity - *" .

The reason of the solution above is that a View allows us to display even unpublished or restricted results and we should be able to control everything there.

An other option is to perform a validation similar to a one of contextual filter.

olli’s picture

I agree. That seems to be the way it is in d7 to fix SA-CONTRIB-2013-068.

dealancer’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)

So I am closing this issue.

olli’s picture

Status: Closed (duplicate) » Active

I don't think that fix is in d8 yet.

dawehner’s picture

You are right, thank you for spotting this.

olli’s picture

Status: Active » Needs review
StatusFileSize
new1.56 KB

Here's the code from entity_views_handler_area_entity.inc.

No tests yet.

Status: Needs review » Needs work

The last submitted patch, 6: drupal-2087253-6.patch, failed testing.

olli’s picture

Status: Needs work » Needs review
StatusFileSize
new4.23 KB
new2.67 KB

Here's a test.

Status: Needs review » Needs work

The last submitted patch, 8: drupal-2087253-8-fail.patch, failed testing.

dawehner’s picture

Status: Needs work » Reviewed & tested by the community

Perfect!!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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