Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Role Paywall

247 sites Security covered
View on drupal.org

This module allows administrators to hide specific fields of content from users who lack appropriate permissions. It operates on a field-by-field basis to maintain access to other parts of the page, ensuring users don't receive access denied errors. This feature can be configured for specific entities and bundles, with options to control access through user roles and permissions.

The Role Paywall module allows site administrators to hide premium content from users that don't have access to it. This is performed on a per-field basis so the user will still see other parts of the page.

Features

  • Supports core content entities (node) plus custom content entities.
  • Paywall restrictions can be applied for specific entities only. Select a boolean field on the entity to control the paywall.
  • Provides permission and user role access rules for restricting access to content.
  • Provides the Access premium content permission to assist with restricting access to content.
  • Fields to hide can be selected for each entity and bundle.
  • Provides a block visibility condition, will show the block if the entity was restricted by the paywall. This improves the user experience and provides the opportunity to sell subscriptions.
  • Keeps the entity accessible, no 403 access denied errors.
  • Plugins can be added to provide additional access rules allowing other modules to bypass the paywall.

Install

Installation via composer is recommended.
composer require 'drupal/role_paywall:^2.1'
Enable module via the Extend tab or via drush.

Set up

Once the module is installed, go to the settings form and select the entities that contain premium content. This module supports all content entities that have a canonical URL, with the exception of some core entities. After saving the form, a tab will appear for each entity selected. Click on the relevant tab to configure the settings for that entity.

Note: If the entity supports bundles, you will first need to select which bundles the paywall configuration should apply to and then click save to show the rest of the form.

The configuration form shows the access rule plugins available, the entity bundles (if applicable), the 'premium content field' and the fields to hide. Each access rule plugin provides its own settings form and will need to be configured before it can be used. Once the plugin is configured, tick Enabled to activate the access rule.

The paywall can be activated for all entities or for specific entities only based on the value of a boolean field on the entity.

The list of fields to hide are taken from the Full or Default entity view modes. To show a paywall block on the page, configure the block using the standard Block Layout provided by Drupal. Under the block visibility settings, select Role Paywall and then select the entity type this block relates to. It is also recommended to configure a path in the Pages visibility.

Payment and eCommerce integration

This module is focused on the 'wall' part of the 'paywall'. Other modules like commerce license along with Drupal Commerce 2 can be used to manage the subscription itself and handle payments and renewals.

Activity

Total releases
2
First release
Nov 2025
Latest release
1 month ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
2.1.12 Stable May 18, 2026
2.1.11 Stable Nov 27, 2025