Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Node Access by Field Role

No security coverage Under active development 5 sites

This module grants granular control over which users can view specific content nodes. It allows administrators to restrict access based on roles assigned in reference fields or by directly referencing individual users. This ensures that content is only visible to the intended audience, such as sales representatives seeing their assigned clients or developers viewing assigned tasks.

Summary:

Node Access by Field provides fine-grained node access control based on role reference fields and user reference fields.
It allows you to restrict visibility of nodes depending on who is assigned in specific fields or what roles are selected per node.

Features

  • Restrict node visibility per role using a "Role access" field (checkboxes with Drupal roles).
  • Restrict node visibility per user reference field: e.g. Developer role only sees nodes where field_developer matches the logged-in user.
  • Define global full-access roles and global deny roles.
  • Configure per-content-type settings with a flexible UI.
  • Works with Drupal’s native node access system, Views, and Search API.
  • Compatible with Drupal 9, 10 and 11.

Use cases:

  • CRM / Sales: Only the commercial assigned to a client (via field_comercial) can see that client’s node.
  • Issue tracking: Developers only see the issues where they are assigned in field_developer.
  • Knowledge base: Certain nodes in a "Data bank" content type are visible only to specific roles (support, managers, etc).

Post-Installation

  1. Enable the module (drush en node_access_by_field or via the Extend page).
  2. Go to Configuration → People → Node Access by Field (/admin/config/people/node_access_by_field) to configure global and per-bundle rules.
  3. To allow per-node restrictions, add the provided Role reference field to the desired content types.
  4. Clear caches (drush cr).
  5. Test with different users and roles.

Additional Requirements

  • No external libraries required.
  • Works with Drupal core only.
  • Views: to display node listings respecting the access rules.
  • Search API: access restrictions also apply to indexed results.
Drupal 9–11

Ask your assistant about Node Access by Field Role

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

  • node Drupal core
  • user Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Sep 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Core PHP Release date
1.0.1 Stable 9–11 Sep 2, 2025
1.0.0 Stable 9–11 Sep 2, 2025