Allow restrictions to remain after disabling a layout

Created on 23 August 2022, over 2 years ago
Updated 26 May 2023, over 1 year ago

Problem/Motivation

User story: As a site manager, I want to be able to set section-specific restrictions while creating a default entity display, and then remove that section from allowed layouts, so that content editors can use the section with its block restrictions but not create additional sections with that layout.

Background

Note: Starting from version 2.14 all restrictions from layout are removed after disabling layout in the "Layouts available for sections" section, effectively introducing a regression for people using Layout Builder Restrictions in the manner described above:

1. Enable layout in the "Layouts available for sections" section
2. Add restrictions for the previously created layout and save
3. Disable previously enabled layout in the "Layouts available for sections" section and save
4. Enable the same layout again -> all restrictions are gone

Proposed resolution

Do not clear restrictions from layout after disabling the layout in the "Layouts available for sections" section.
It is used for next scenario:

1. Configure blocks restrictions for certain section
2. Add it to default layout
3. Restrict certain section
4. Section added in #1 will have all configured blocks restrictions but no other copies of this section can be added by user

✨ Feature request
Status

Fixed

Version

2.15

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine ihor_allin Kyiv

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