Edit media button broken with insufficient permissions

Created on 2 July 2025, 30 days ago

Problem/Motivation

As pointed out in https://www.drupal.org/project/edit_media_modal/issues/3352274#comment-1... ✨ Support CKEditor5 Needs review , there is a problem with the 'Edit media' button when the user doesn't have "update" permission on the media entity. The button simply fails to do anything.

Steps to reproduce

1. As a user with limited permissions, embed an image that you don't have permission to edit.
2. Click the 'Edit media' pencil button and note that nothing happens.

Proposed resolution

Since the user can't edit the media, perhaps just show them the media entity's "view" page so they can see more context about which media entity is embedded. Or at least display some sort of error message informing them of the permission issue.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States RichardDavies Portland, Oregon

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

Comments & Activities

Production build 0.71.5 2024