Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

access_by_ref

435 sites Security covered
View on drupal.org

Lightweight module that extends read, update or delete permissions to a user in the following cases:

  1. "User": The node references the user
  2. "User's mail"The node references the user's e-mail
  3. "Profile value": The node has a value in a specified field that is the same as one in the user's profile
  4. "Inherit from parent": The node references a node or user that the user has certain permissions on.

In each case, the rule only applies to logged-in users with general permission to access nodes by reference, and only on the node types and field names set in the configuration page.

Permissions are "chainable", but note that there is no protection against infinite loops, so some care is advised in configuration.

Example

Let's suppose you have a content type Sailboat (yacht_profile). Apart from the conventional methods, to use our system to extend edit access, you can do one of the following three things:

1. "User": Add a user_reference field to the yacht_profile content type, edit a Sailboat node to reference User1, and in the box labeled Grant Access to User referenced in this field, enter yacht_profile|user_reference and save.

2. "Profile value": Add a number or text field to the yacht_profile content type, like a membership_number, and use that same field in the user profile. Edit both to have the same value. In the box labeled Grant Access to User with Common Profile Value, enter yacht_profile|membership_number.

3. "Inherit from parent": Create another content type called Fleet. Let the "owner" of the fleet be in charge of all the boats in that fleet. Create an entity reference field in yacht_profile called my_fleet. Give User1 edit access to a new Fleet node, and also edit one or more sailboat nodes to refer to that node in my_fleet. In the box labeled Grant Access to Editor of Referenced Node, enter yacht_profile|my_fleet.

In all cases, be sure to set permissions to allow authenticated users to use Access by Reference.

Other Node Access Modules

Activity

Total releases
3
First release
Apr 2025
Latest release
11 months ago
Release cadence
9 days
Stability
67% stable

Release Timeline

Releases

Version Type Release date
4.0.1 Stable May 12, 2025
4.0.0 Stable Apr 28, 2025
4.0.x-dev Dev Apr 25, 2025