Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Layout Builder Advanced Permissions

Security covered Maintenance fixes only 521 sites

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.

Drupal 10–11

Ask your assistant about Layout Builder Advanced Permissions

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • layout_builder Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Oct 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 3
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
2.2.1 Stable 10–11 Aug 13, 2025
2.2.0 Stable 10–11 Jan 23, 2025
2.1.3 Stable 9–10 Jan 23, 2025
2.1.2 Stable 9–10 Oct 25, 2023
2.1.1 Stable 9–10 Oct 6, 2023
2.1.0 Stable 9–10 Oct 3, 2023
2.0.0 Stable 8–9 Oct 3, 2023