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).

Feature Overview

  • Provides a "Role access" field to determine access permissions per fielded entity by selected roles
  • Selected roles can be allowed or denied access per entity
  • Fallback behavior, if no role is selected, can be defined per field
  • Entity access can be defined by allowed operation (view,edit,delete)
  • Setting "View Unpublished" also allows access on unpublished entities if desired
  • Access check can be skipped by global permission for permitted roles

Initially based on Entity Access by Role by Shamrockonov. Thank you very very much, @Shamrockonov. We finally decided to split this module off.

Reasons for split-off-fork:

We decided to split this module of due to large code refactorings and missing maintainer response. Perhaps this will one day land in a 2.x entity_access_by_role module, but due to changes in the field schema the upgrade path might become complicated.

Screenshots

Field Settings:

Widget Settings:

Views support

This module implements hook_entity_access() to dynamically calculate entity access permissions. Due to the complex logic it doesn't implement hook_query_TAG_alter().
So Views may display entities, which are "Access denied" for the users! Take care, in some combination this may lead to information disclosure for such Views contents (e.g. seeing the label you should not see).

Until the core issue (#777578: Add an entity query access API and deprecate hook_query_ENTITY_TYPE_access_alter()) is fixed, you may try the views_entity_access_check module if you're running into such cases:
https://www.drupal.org/project/views_entity_access_check
And please help to push a core solution in the linked issue.

Debugging permissions / entity access

For debugging permissions on entities, the following modules can be helpful:

  1. Devel
  2. Web Profiler
  3. Drush Tools
  4. Masquerade

Alternative modules:

Need to define access based on referenced entities instead?

Try our Entity Access by Reference Field module, which is based on the code and knowledge from this module to implement functionality similar to what we knew from Node access node reference and Node access user reference but that have no Drupal 8+ release.

Supporting this module

Support DROWL's ♥ FOSS work on this module on OpenCollective!

Drupal and this module are FOSS. However, it takes dedicated people to develop and maintain. And they need YOU to give back!

We're committed to building and maintaining Drupal modules that benefit the entire community.

Supporting us on OpenCollective helps us continue to improve, innovate and contribute to Drupal's future. Every pledge makes a difference!

If this module has helped you, we would be very grateful for your donation to support its further development and maintenance.

Support our FOSS development ♥️

You can also speed up the development of features or bugfixes you'd love to see, by sponsoring and giving back!

Sponsor a feature or bugfix 🚀

Let's make Drupal even better, together!

Development proudly sponsored by German Drupal Friends & Companies:

webks: websolutions kept simple (https://www.webks.de)
and
DROWL: Drupalbasierte Lösungen aus Ostwestfalen-Lippe (OWL), Germany (https://www.drowl.de)

Activity

Total releases
1
First release
Jan 2026
Latest release
3 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
2.0.6 Stable Jan 12, 2026