Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module enhances Layout Builder's access control by providing fine-grained permissions for various actions like adding or configuring blocks and sections. It automatically generates permissions and offers an API for custom permission plugins.

This module allows for more granular access control to Layout Builder by providing a set of permissions.

1.x

Features:

  • control access to layout builder page
  • control access to create/remove sections
  • control access to add and configure blocks
  • control access to edit block content
  • control access to reordering blocks
  • control access to pages user owns

2.x

The 2.x version of this module automagically generates a set of permissions based on available layouts, content types and block types. It provides an API module that defines a LayoutBuilderPermission plugin type and a set of submodules that provide plugins of this type for common use cases.

One can also define their own permissions. The Layout Builder Advanced Permissions module uses plugin discovery to find and apply permissions. To add your own
permissions, you can add a class that extends \Drupal\layout_builder_perms\LayoutBuilderPermissionBase and is
annotated with the \Drupal\layout_builder_perms\Annotation\LayoutBuilderPermission annotation. The class file should
be created in a ./src/Plugin/LayoutBuilderPermission folder in your custom module.

Each plugin should define a permission for a single operation in the layout builder. Supported operations are:

  • Add a section: section_add
  • Update a section: section_edit
  • Remove a section: section_remove
  • Add a block: block_add
  • Configure a block: block_config
  • Move a block: block_reorder
  • Remove a block: block_remove

To create a plugin for each of these operations in a given context you can use a plugin deriver. A base class
\Drupal\layout_builder_perms\LayoutBuilderPermissionPluginDeriverBase is available to make your life easier here.

See the Layout Builder Advanced Permissions Global submodule for an example.

Activity

Total releases
3
First release
Jan 2025
Latest release
11 months ago
Releases (12 mo)
1 ▼ from 2
Maintenance
Slowing

Release Timeline

Releases

Version Type Release date
2.2.1 Stable Aug 13, 2025
2.2.0 Stable Jan 23, 2025
2.1.3 Stable Jan 23, 2025