Use custom formatter to access media type bundle id

Created on 29 September 2023, 9 months ago
Updated 24 October 2023, 8 months ago

Problem/Motivation

The pagedesigner media submodules use the media bundle ids to provide media entries to the pagedesigner asset manager using views. The bundle id requires the "administer media types" permission, which might present a security issue.

Using a custom field formatter, the media modules could display the bundle ids using the view label permission.

Proposed resolution

- Add a new formatter based on EntityReferenceIdFormatter from core and overwrite the checkAccess method to use the "view label" permission.
- Update hook to set the new formatter on the media bundle id reference field in the pagedesigner media views.
- Update supplied config in the media modules to use the new formatter.

User interface changes

None

API changes

- The default views of pagedesigner will use the new formatter for the media bundle id for the media bundle id reference field.

Data model changes

None

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland pvbergen

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

Comments & Activities

Production build 0.69.0 2024