Fails to implement hook_entity_access for individual access

Created on 14 February 2019, over 6 years ago
Updated 22 May 2025, 5 months ago

Problem/Motivation

While this module cares for node grants and filters listings, it does not do the same for individual node access.

Worse, modules like search_api test individual access to check if they run the content_access preprocessor (so list access fails too).

Proposed resolution

Implement hook_entity_access.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇩🇪Germany geek-merlin Freiburg, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇬🇧United Kingdom lincoln-batsirayi

    I've rerolled the patch for the latest version for the module and confirmed that it's working in my set up of using domain access with the group module and workflows. Previously without this patch content inside an editorial group wouldn't have the domain access settings applied to it and now it does.

    I'm still at the early dev stages for this so i may make further updates to the patch as i progress.

  • 🇬🇧United Kingdom lincoln-batsirayi

    Okay, so I’ve got another follow up fix to add onto the patch for this issue, i found that i was getting an issue of constant 502 nginx errors initially triggered on admin pages and after a load of investigation i found that they were being caused by an infinite recursion error inside the invokeAll all method because this module would call this function and itself in the process.

    So I’ve added the following line inside the invokeAll method so that the module skips calling itself:

    if ($module === 'acb') {
      continue;
    }
    
Production build 0.71.5 2024