Users cannot see the name of the Group that they were invited

Created on 29 June 2022, almost 2 years ago
Updated 9 October 2023, 9 months ago

Problem/Motivation

With the default Group permissions - that does not allow non-group members to access information about a Group, in other words, without granting "View published group" to outsiders - invited users cannot see/access the name of the Group that they were invited.

(Please see the attached screenshot.)

Steps to reproduce

Proposed resolution

Well, this could be a tricky one, but what we did on a downstream project (and probably that could be also implemented in this module) is:
1. We override the entity access handler of Group because it uses the default one that does not differentiate "view" vs. "view label" operation. See: https://github.com/drupal/core/blob/9.4.x/lib/Drupal/Core/Entity/EntityA...
2. In that custom access control handler - but after "view" and "view label" is considered a different operation this could be even implemented in a hook_ENTITY_TYPE_access() for group entity type - we added a small glue code that grants "view label" access to a user if it has a pending invitation to a group.
3. ...and FTR, we also had to patch Drupal core's EntityReferenceLabelFormatter because after that it incorrectly started to render links instead of plain text Group titles: See https://www.drupal.org/project/drupal/issues/3293287 β†’ .

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary mxr576 Hungary

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.69.0 2024