A person can request to join a group, e.g. a staff person can ask to be a member of a department

Created on 1 February 2024, 8 months ago
Updated 3 February 2024, 8 months ago

Problem/Motivation

In a setup similar to the group content by department β†’ tutorial, you could see the use case in people being able to view departments (or classes or any kind of group) and request membership

Proposed resolution

The underlying functionality is a person can edit their user account to reference a term, but before that revision of their account is active a moderator needs to approve. This would require User Revision β†’ module and some implementation of workflow / content moderation for users, which i haven't found to exist at all. (Drupal user account edit workflow moderation" doesn't turn up anything useful, at least!) Plus, the ability for users with a policy making them managers of a group (term) to be the ones doing the moderation would have to be bolted on.

Another solution then would be a standalone queue, pressing a button on the group adds you to the queue, optional text field to say why you want to join, that kind of thing, so its own entity, it's own queue, etc. (The expection in this case that users do not have access to edit the term reference field on their user entity themselves).

All of this is (probably?) entirely separate from what Access Policy module itself does, but it is a use case very much suggested by Access Policy so seeing if anyone has done something similar and/or has feedback on what would be a good contrib solution (even if we need to build it).

This might look something like reverse engineering Group Membership Request β†’ and making it super generic so a user can ask to be added to any entity. Might as well make it so it can be configured to either mean putting the user into a user reference field field on the requested entity, or add the requested entity to an entity reference field on the user account.

Remaining tasks

  1. Stop overthinking
  2. Do something

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Postponed

Version

1.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

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

Comments & Activities

  • Issue created by @mlncn
  • πŸ‡ΊπŸ‡ΈUnited States partdigital

    Hi mlncn!

    This kind of functionality has come up a few times in slightly different versions. You can see these issues here:

    I think one of the biggest issues we're are running into is that Taxonomy terms are a bit of a misfit for creating groups of users. They are great for categorizing content but miss some workflow features for handling users.

    I had been considering a few approaches for this. The one that I like the most is a kind of "Access Policy Group" module. However, that is also the most work.

    1. It would be a new "Group" content entity type.
    2. It would very simple and share a lot of features with Taxonomy terms such as nesting and weights. It's essentially just another entity that access policy can talk to.
    3. You use it by adding entity reference fields to the Node and User like with taxonomy terms.
    4. The group would come with some operations like Manage members, Add member etc. These essentially are just forms for setting field values on the user.
    5. The Access Policy Group module would ship with its own access rules so in that way it can be more more prescriptive than taxonomy terms.
    6. The access part of this would already be mostly handled by access policy. This would primarily be a module with workflow enhancements.

    A new Group content entity type would clear the runway for features more geared to user enrollment.

    On a related note; I'm currently working on making operations (view, edit, delete) pluggable. So with an "Access Policy Group" module we could also add operations like "Add member" and it would easily integrate with access policy. In fact, each operation is context aware so it will only show operations that are applicable to their respective entity type.

    What do you think?

  • πŸ‡ΊπŸ‡ΈUnited States partdigital

    I've opened a discussion thread around groups, I've received a few related requests so I thought it might be useful to consolidate ideas into something cohesive.

    https://www.drupal.org/project/access_policy/issues/3419012 🌱 Discussion: Access policy group enhancements Active

  • Status changed to Postponed 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States partdigital
Production build 0.71.5 2024