Module Description
The Block Content Permissions module allows you to control access to administer block content types (custom block types), administer block content (custom block library), and create, update, or delete specific types of block content.

This module removes the required "Administer blocks" permission from all block content and block content type pages except for the "Custom block library - Blocks" views page. There is an open issue for the remaining page. [2920739]

The following permissions are added:
Administer block content types Grants access to manage block content types. Permissions for each block content type Grants access to manage block content for a given type:
* [type]: Create new block content
* [type]: Delete any block content
* [type]: Edit any block content

View restricted block content Grants access to view restricted block content that the user cannot manage on the Custom block library page. Otherwise, list only contains types the user can create, delete, or edit. Installation and Setup

* Install the module as you normally would any module.
* Assign permissions created by this module to grant access. Adding or removing block content types (custom block types) after enabling this module will automatically update on the permissions page.
* Add the following permissions to allow access to edit blocks in-place (on-page):
* Use contextual links (Contextual Links module)
* Access in-place editing (optional, Quick Edit module)


* Add the following permission to allow access to menus related to administering blocks:
* Use the administration pages and help


* Add the following permission to allow access to the "Custom block library - Blocks" page:
* Administer blocks



Note: The "Administer blocks" permission also grants full access to all pages related to "Block Layout". To restrict access to those pages, you can use the Block Region Permissions module.

How to migrate to core permissions
As of Drupal 10.1.x-dev, this module is no longer needed. To switch to the "Custom Block" core module's permissions, migrate and setup new permissions (see below), disable this module, test, and uninstall this module.

Note, the "Custom blocks" page moved from under "Structure" to "Content".

Disable the "Administer blocks" permission for roles that shouldn't access the "Block layout" page, which was previously needed to do anything with custom blocks.

Enable the "Administer block types" permission for roles that have this module's "Administer block content types" permission set.

Enable the "Access the Custom block library page" permission for roles that should access the "Custom Block" page. Note, this is needed for UI navigation related to create, delete, and edit permissions.

Enable the "Administer block content" permission for roles that should create, delete, edit, and revert [all] custom blocks for all types.

(Skip for roles with the "Administer block content" permission enabled.) Enable permissions for roles that should create, delete, edit, or revert [some] custom blocks. Note, the "View custom block history pages" permission is needed for UI navigation related to the revert permission.


* [type]: Create new custom block (<<< [type]: Create new block content)
* [type]: Delete custom block (<<< [type]: Delete any block content)
* [type]: Edit custom block (<<< [type]: Edit any block content)
* [type]: Revert custom block revisions
* [type]: View custom block history pages

 

As of Drupal 10.1.x-dev, this module is no longer needed. For more info, see #1975064: Add more granular block permissions.

Project Usage
16496
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
The Block Content Permissions module aims to solve the issue of controlling access to administer block content types and specific types of block content within Drupal.
Data Name
block_content_permissions

OPENAI CHATBOT

OPENAI CHATBOT

12:21:02
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.