Access to Revisions of Group Content is Broken

Created on 5 January 2022, over 3 years ago
Updated 12 September 2024, 7 months ago

Problem/Motivation

When a node is attached to a group as content, all access is cut off to that node's revisions; seemingly for all users.

Steps to reproduce

  1. Clean install of Drupal 9.3 using the basic/standard settings
  2. Install and enable Group, Group Node and their dependencies
  3. Create a group type allowing Basic Pages to be added as content
  4. Create a Basic page
  5. Verify that the "Revisions" tab is displayed and that the list of revisions is accessible (/node/###/revisions)
  6. Add the page to the Group through the "Add existing content" button interface at /group/###/nodes
  7. View the Page - the "Revisions" tab is not displayed, and access is denied for even User 1 to /node/###/revisions
  8. Removing/Adding the content from/to the group toggles access

Proposed resolution

Access to revisions should not be removed unless there's a more specific group setting taking priority.

Remaining tasks

User interface changes

API changes

FWIW, I noted that in the group_entity_access(), that although the admin user has the "view all revisions" permissions for nodes, while looping through the plugins (group.module:line339ff), when it hits "group_content:my_node_type", we get the AccessResultForbidden.
From a logic standpoint, I'm not sure whether having access to a node type's revisions should automatically give one access to the equivalent group_content:type, or if there's something else missing, like a specific permission for that connection entity.
It has also been suggested ( https://www.drupal.org/project/group/issues/3254038 πŸ› Revisions no longer work since Drupal 9.3 Closed: duplicate ) that this may be a core bug. If there's evidence of that, a link to any related issues or potential code would be appreciated.

Data model changes

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States msypes

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