Action (buttons) and Tasks (tabs) not cached according to group permission

Created on 12 January 2017, almost 8 years ago
Updated 30 August 2023, about 1 year ago

I'm setting up a course system where each group will be a course and there will be two roles, teacher (with management permissions) & student (with limited permissions). The problem I've noticed is that if caches are rebuilt and the student (with limited role) views the group first, then the local-actions block (with the actions like "+ Create Node") and the local-tasks tabs (for edit, delete, members, etc) aren't show when the teacher goes to view the group, because these two blocks are cached without the group_membership.roles.permissions context. This is shown in this screenshot:

Similarly, if a user with the elevated role views the group first, then the tabs will be displayed to users with the restricted role even though the extra tabs:

Steps to reproduce:

  1. Create two roles for a group, one that can just view the group (and nodes) and the other with elevated permissions.
  2. Clear the cache
  3. Access the Group with a limited role
  4. Access the Group with an elevated role, note the missing tabs/buttons

I have created a patch that fixes this issue. This is related to #2778865: Core local tasks block doesn't show "Related Entities" tabs when user's group role (permissions) are changed β†’ and hopefully this fix should also fix that issue.

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States adamfranco

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