Permissions creating new content

Created on 6 December 2023, 12 months ago
Updated 10 April 2024, 8 months ago

Problem/Motivation

I have a group role of "Approver" that has permissions for every moderation transition (see screen shot of granted permissions in the group type permissions). However, if they are creating new content, they get this error:

You do not have access to transition from Draft to Draft

When testing, I can see that the content moderation edit form does not even show.

If it is existing content, the content moderation form element does show.

Steps to reproduce

Have a user that has a Drupal role that does NOT grant moderation permissions. Set permissions for the group type for the user to have permissions to create a new draft. Create new group content.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States shelane

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

Comments & Activities

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

    Of course I’m thinking that though the node type is set for groups, a new node form isn’t yet associated to a group. How would it then know to allow. I’m wondering how other people handle this.

  • πŸ‡¨πŸ‡¦Canada dale42 Vancouver, Canada

    I'm still on 1.0.0, but encountered the same problem.

    My issue was caused by the module not being able to determine what group the content should be created in, so the user never received the appropriate permission via group membership.

    My content creation is /node/bundle/add, and the module uses the ->getGroupFromRoute() method from GroupRouteContextTrait, which gets the group id from the path.

    Since none of the moderated content entities are used outside of groups, I could add the create draft permission to all users.

Production build 0.71.5 2024