This modules restricts more than just the full "view" page of a node

Created on 17 September 2019, over 5 years ago
Updated 27 May 2025, 11 days ago

The access control restriction used by this module actually affects more than just the node "view" page. The hook_node_access hook is invoked whenever entity view access is requested, which happens on more than just node "view" page. For example, when a node is being rendered in a the "teaser" view mode via some entity reference field.

Unfortunately there's really no way around this because entity access checks are not passed the view mode an entity is being rendered in. They are just passed an "operation" (which can be view, view label, create, edit, or delete). So the node access check hooks do not have the context a node is being viewed in when determining proper access.

I just think you may want to point this out on the project page.

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

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.

Production build 0.71.5 2024