Permissions do not apply to moderation on group entity itself

Created on 10 May 2021, almost 4 years ago
Updated 18 September 2023, over 1 year ago

Problem/Motivation

https://www.drupal.org/project/group/issues/3029907 β†’ enables groups to be revisionable, which means content moderation workflows can be provided to a group entity.

The permissions in gcontent_moderation appear to work well with subgroups having content moderation.

However, I'd like users to be able to do content moderation on the group entity itself based on the group-specific permissions (e.g. a group leader can create a draft version of the group entity, and a group administrator can change it to published).

(From my point of view, the distinction is ambiguous as the module is currently described/set up - "content" could mean "group content [content] moderation" or "group [entity] content moderation", and classes like GroupStateTransitionValidation should probably more accurately be called GroupContentStateTransitionValidation).

Proposed resolution

Allow permissions created by gcontent_moderation to apply to the workflow of the group entity itself, as well as any group content.

Notes

No other changes would be needed here as the other patch creates all the revisions interface, Latest version tab, etc.

I don't think this is dependent on the revisionability patch being in the Group module core, because I'd imagine any changes to this module just wouldn't have an effect if groups aren't revisionable.

I'd be happy to try to do this myself if someone can point me in the right direction; I imagine it needs a new StateTransitionValidation for the group entity type.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

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.

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

    I don't believe the feature described here would have been possible when the issue was originally raised, since Groups 1.x has never supported Workflow integration (which is separate from revisioning).

    However, we now have Groups v2/3, which do support Workflows, and it seems this issue predicted the future: The "Group Content Moderation" permissions matrix for workflows under "Edit group type permissions" only applies to "group content," not to the group entity itself.

    This means that group entities will fall back to sitewide permissions for determining workflow access, which can easily lead to group roles having access to more or fewer workflow permissions than intended when they are editing group entities. Worse, roles can lose edit access to group entities entirely if they do not have a suitable sitewide permission for workflow transitions.

    This is something I'd be interested in seeing resolved. If anyone thinks it'd be a bad idea to unilaterally impose these permissions on group entities then perhaps it can be a site settings checkbox somewhere to toggle this feature.

Production build 0.71.5 2024