Groupmedia is not checking group permissions but site permissions when adding media entities via media library

Created on 22 September 2021, about 3 years ago
Updated 15 May 2023, over 1 year ago

Problem/Motivation

A group member with group role that allows her to add and edit media entities to group who doesn't have a site role with 'create' or 'edit' new content (nodes) is not able to add media entities via media library to a group page.

Steps to reproduce

- Create a user without site permissions to create or edit nodes
- Create a group and add the user as member
- Create a group role with permissions to add node entities and relations and add this role to the member
- Try to create add an entity (node) that has a media field that uses media library. Select a previously uploaded image and try to add it to the entity.
- It will fail in JavaScript console with 403 permission denied

Proposed resolution

- Take into account that group roles with permissions to add entities and relations should be enough as an access check validation and not rely just on site permissions because this is a group module.

Remaining tasks

- Patch
- Review
- Test

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇪🇸Spain barrio Valencia

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