Add bundle information to LayoutBuilder

Created on 22 August 2022, about 2 years ago
Updated 27 May 2024, 6 months ago

Problem/Motivation

Alter contextual links based on roles per block type available in layout builder page.

Steps to reproduce

- Add a Block using the layout builder page
- Login as a contributor role (this role can access and edit the blocks on Layout page)
- The contributor should not be able to "Configure" a custom block of type "MyCustomBlock"
- The administrator (or any other role as desired) is/are the only role(s) that can see and click the "Configure" contextual link for a block of type "MyCustomBlock"

Proposed resolution

Have an additional information available in the $route_parameters for hook_contextual_links_alter(). Add bundle information to layout builder to identify the block type rendered

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Feature request
Status

Closed: cannot reproduce

Version

11.0 🔥

Component
Layout builder 

Last updated about 14 hours ago

Created by

🇮🇳India gauravjeet

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.

  • 🇳🇿New Zealand danielveza Brisbane, AU

    Hello! Thanks for raising an issue. I believe this should be working already with the permissions that are already used within Drupal

    Can we please get some more detailed steps to replicate in the issue summary starting with a fresh install of D11?

  • Status changed to Closed: cannot reproduce 6 months ago
  • 🇳🇿New Zealand danielveza Brisbane, AU

    This has been inactive for 3 months since the last comment that asked for more replication steps. I'm marking this as closed. Thanks!

Production build 0.71.5 2024