Block Access Allows You to Control Blocks for User Roles
“Block Access” is one of the most popular features in the PublishPress Blocks plugin. This feature allows you to control which blocks are available to different user roles.
For example, if you want to prevent some user roles from adding “Table” blocks, you can block them from doing that with this feature.
In version 2.10 of Blocks, we've simplified the “Block Access” feature. The system is now based on user roles and is very similar to the PublishPress Capabilities plugin.
- To get started, go to “Blocks”, then “Block Access”.
- In the top-left corner, you can choose the user role you want to edit.
- You can enable/disable blocks in Gutenberg by clicking on them.
- When you're finished, press the “Save Block Access” button to update the user role.
- Once saved, the blocks will be available (or not available) in the post editor when the user creates content.
An example of Block Access in action
One of the most common uses of the Block Access feature is removing blocks for low-level users.
In the image below, I've selected the “Author” role and disabled all the blocks except for a few key blocks including Paragraph, Heading, List, and Image.
This next image shows what a user in the Author role will see when they write a post. =Only those few blocks are available. This is a great way to make sure that low-level users don't add the type of content that you want to restrict.
More about Controlling Access to Gutenberg
The PublishPress plugins offer a wide variety of ways to control the Gutenberg editor. For example, there are ways to disable the Gutenberg editor for specific roles. You can also hide metaboxes from 3rd party plugins or even remove specific links from the block toolbar menu.