Paragraphs Item cache lacks context

Created on 19 September 2024, 2 months ago

Problem/Motivation

When creating a page with multiple paragraph items nested on the page and different role visibility applied, the page gets cached with the first rendered paragraph item. This can expose it to the roles it is meant to be hidden.

Steps to reproduce

  1. Add paragraphs fields on a content type (Page)
  2. Add a paragraph item and assign it to Role A
  3. Add a paragraph item and assign it to Role B
  4. Viewing the page as a user with only Role A renders the page with paragraph item with Role A permissions
  5. Viewing the page as a user with only Role B renders the page with paragraph item with Role A permissions and doesn't render paragraph item with Role B

Proposed resolution

Adjust the cache context to account for roles on the paragraph items. I provided a patch to do this.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sjmolinski

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

Comments & Activities

Production build 0.71.5 2024