Module Description
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:


* Devel
* Web Profiler
* Drush Tools
* Masquerade

Alternative modules:
* https://www.drupal.org/project/access_policy seems very powerful but also complex
* Role Access Control
* Entity Access by Role
* Entity Access by Reference Field
* Private Entity
* Personal Access Restriction
* Content Access
* Node View Permissions
* Access Policy

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.

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)

Project Usage
90
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve access permissions per fielded entity by selected roles, allowing roles to be allowed or denied access per entity with fallback behavior and defined entity access by allowed operation.
Data Name
entity_access_by_role_field

OPENAI CHATBOT

OPENAI CHATBOT

12:22:10
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.