Unpublished content can be viewed by anonymous

Created on 7 September 2020, about 4 years ago
Updated 30 August 2024, 3 months ago

Problem/Motivation

Since the property status of nodes is a core functionality, I think Grant should not override that. Grants should only apply if the content is published. At least for the view permission.

(Previously addressed in Drupal 7 version: #1444040: Access to unpublished node )

Steps to reproduce

Create a node as not published.
Go to the Grants tab and choose all roles as "view". Specially if you give the Anonymous role access.
Go to view in an incognito window the node and you will have then permissions to see it.

Proposed resolution

Let core deal with unpublished content via the permissions.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇳🇱Netherlands e.escribano

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

Production build 0.71.5 2024