Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Role Paywall

Security covered Maintenance fixes only 276 sites

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.

Drupal 10–11

Ask your assistant about Role Paywall

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Nov 2025
Latest release
4 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
2.1.12 Stable 10–11 May 18, 2026
2.1.11 Stable 10–11 Nov 27, 2025