This module lets you grant specific user roles access to view unpublished nodes of a specific content type. Access control is quite granular in this regard.

The module uses the node access system of Drupal core. It does not require any changes to your existing URL structure.

Sample use case

Use it together with the Override node options module to give specific roles the ability to publish and unpublish certain content types without giving those roles administrative access to all nodes.

Usage

After you install the module, go to Administration > People > Permissions and give the applicable permissions to the roles that must see unpublished nodes:

  • (Content type): View any unpublished content: unpublished nodes of one content type.
  • All content types: View any unpublished content: unpublished nodes of all content types.

Since 2.0.0, the machine name of the permission for all content types is view any unpublished nodes. It is independent of the view any unpublished content permission of the core Content Moderation module.

The module also works with:

  • The Content overview at Administration > Content. With the "not published" filter, users see the unpublished content that they are allowed to view.
  • Views. Use the filter "Published status or admin user", not "Published (= Yes)".
  • Search API (2.x only). With the "Content access" processor enabled on an index, users also find the unpublished nodes that they are allowed to view.

Versions

  • 2.0.x: Drupal 11.4 and 12. To update from 8.x-1.x, update to 8.x-1.6 first. Read the release notes of 2.0.0-beta1.
  • 8.x-1.x: Drupal 10 and 11. Only security fixes and fixes for bugs that prevent the update to 2.0.x.

Common problems

  • Users can not access the node: rebuild the node access permissions at Administration > Reports > Status report > Rebuild permissions. This can take a long time on large sites. Make a backup of the site first.
  • Unpublished nodes are missing on taxonomy term pages: the core taxonomy term view uses the taxonomy_index table, which contains only published nodes. The README of the module explains how to change the view.

Project information

Releases