Access denied when accessing node default add form.

Created on 25 March 2023, over 1 year ago
Updated 26 March 2023, over 1 year ago

Problem/Motivation

I've added a Group reference field to my content type and using the default node form (/node/add/article) to create content. I am also adding the node to Group content programmatically. Now the problem is for group members who has permission to create article nodes, still can not access the default node form (/node/add/article). I'm only able to access the "/group/1/content/create/group_node%3article" which doesn't fulfill my usecase.

I tried different ways to allow access to default node create form for group members who has required "create new Article" permission but none of them was successful. It would be great if anyone can help/guide me get out of this blocker.

Thanks,

Steps to reproduce

  1. Install Drupal (10.0.4) and Group module (Version: 3.0.0)
  2. Add a Group type “Property manager”.
  3. Set the available content for the group type and install the Group node (Article) plugin.
  4. Add a role “Housing officer” to the group type and set scope to “Individual: Can be assigned to individual members”. Edit permissions for the role and grant Entity: Add content item entities underGroup node (Article).
    1. The global role set to user “David” is “authenticated”.
    2. The global role “authenticated” has no permission set to Article: Create new content but the“Housing officer” role inside Group has.
  5. Add a group of type “Property manager” and add member “David” with the “Housing officer” role inside the group.
  6. Log in as “David”:
    1. Visit “/group/{group_id}/content/create/group_node%3Aarticle”, which works fine and as expected.
    2. Visit “/node/add/article”, returns access denied which shouldn’t because the user is member of the group which has permission to add Article content.
💬 Support request
Status

Fixed

Version

3.0

Component

Code

Created by

🇦🇫Afghanistan ab.shakir

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

Comments & Activities

Production build 0.71.5 2024