Paragraphs library not compatible with scheduled_transitions

Created on 10 February 2023, almost 3 years ago

Problem/Motivation

It's not possible for anyone except administrators to access scheduled transitions routes with LibraryItem entities because of this block in LibraryItemAccessControlHandler

Scheduled transitions grants view access based on entity type/bundle permission combos. This is done on the moderated entity itself, so the permissions do not exist for paragraph bundles.

That code chunk passes the view scheduled transition operation down to the referenced paragraph, which returns forbidden because that entity type is not moderated.

Steps to reproduce

Install Scheduled transitions
Add content moderation and scheduled transitions to the Library item entity type
Add permissions to a role to administer the library item and scheduled transitions
Try and access scheduled transitions route for a library item

Proposed resolution

IMO, we should only check known operations on the referenced paragraph (view/update/delete).

🐛 Bug report
Status

Needs review

Version

1.0

Component

Module: Library

Created by

🇦🇺Australia acbramley

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024