Fix Layout Builder Access operation Without Enabled Functionality

Created on 27 August 2024, 24 days ago
Updated 16 September 2024, 3 days ago

Problem/Motivation

Users can access the layout builder on entities regardless of whether layout functionality is enabled or Allow each content item to have its layout customize option is enabled.

Steps to reproduce

  • Navigate to the entity type manage display that supports the layout builder, such as the user entity.
  • Ensure that the layout builder option is disabled.
  • Proceed to the user edit page.
  • You will observe that the local tasks provide a link to access the layout builder.
  • If you click on this link, you will be redirected to the layout builder page for that content without encountering a 403 Access Denied error.

Proposed resolution

Check if the current has any of the following permissions

  • configure any layout
  • configure all {{entity_bundle}} {{entity_type_id}} layout override
  • access layout builder page

This allows to edit the layout of selected content types

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ❌ Release varbase-10.0.2, varbase_layout_builder-10.1.3

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

After the fix:

The Content Admin user role has permission to change the layout.

But the SEO Admin user role has no any permissions to change any layout.
for selected content types.

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.1

Component

Code

Created by

🇯🇴Jordan Ahmad Khader

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

Comments & Activities

Production build 0.71.5 2024