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). 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). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (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.

This module allows administrators to restrict access to specific content or taxonomy terms for individual users or user roles. It also provides options for how to handle denied access, such as returning an "Access denied" message or a "Page not found" error.

🇺🇦

This module is maintained by Ukrainian developers.
Please consider supporting Ukraine in a fight for their freedom and safety of Europe.

Introduction

Personal Access Restriction module provides the ability to restrict access to a particular Node or Taxonomy Term by UID or User role.
Also, it provides the ability to select the type of response ("Access denied" or "Page not found").

To submit bug reports and feature suggestions, or track changes: https://www.drupal.org/project/issues/par

Getting Started

  1. Install Personal Access Restriction module (composer require drupal/par)
  2. Enable Personal Access Restriction module (drush en par)
  3. Set permissions for 'Configure all Personal Access Restrictions', 'Manage Personal Access Restriction' and 'View restricted pages' at /admin/people/permissions
  4. Add your access restrictions for any Node or Taxonomy term on their add/edit pages (you will see the 'Personal Access Restriction' collapsed container).
  5. Fill the User ID field to restrict access to an entity for particular users. You can set multiple UIDs separated by whitespace.
  6. Fill the Roles field in case if you want to restrict access to an entity for all users with some role.
  7. In the "How to show the page?" field you can set the access restriction type for this entity. Also, there is a default variant that you can use in case if you want just to select users or roles for further access restriction but do not want to restrict access right now.
  8. You can see a list of all restrictions at /admin/config/par. On this page you can filter access restrictions by Entity type, Entity ID, UID, User role and action.
  9. If you want to provide the ability to see restricted entities, you can add 'View restricted pages' permission to some User role at /admin/people/permissions#module-par. Users with the 'Administrator' role will see pages with restricted access in any case.

Requirements

No special requirements.

Installation

  • Install as you would normally install a contributed Drupal module.
    See: https://www.drupal.org/node/895232 for further information.
  • If you are using Composer you can install this module by the command:
    composer require drupal/par

Configuration

  • Configure the user permissions in Administration » People » Permissions:
    • Configure all Personal Access Restrictions (Personal Access Restriction)
    • Manage Personal Access Restriction (Personal Access Restriction)
    • View restricted pages (Personal Access Restriction)

The top-level administration categories require this permission to be accessible.

Maintainers

Activity

Total releases
3
First release
Dec 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 3
Maintenance
Dormant

Release Timeline

Releases

Version Type Release date
3.0.9 Stable Jan 20, 2025
3.0.8 Stable Jan 17, 2025
3.0.7 Stable Dec 8, 2024