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.
Disable Blocks
Disable Blocks
  • 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.
Screen Shot 2020 12 10 At 13.04.08
  • Once saved, the blocks will be available (or not available) in the post editor when the user creates content.
Screen Shot 2020 12 10 At 13.11.06

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.

Author Block Access
Author Block Access

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.

Author Blocks
Author Blocks

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.

You can also hide elements in the Gutenberg with the Editor Features screen or force users to use either Gutenberg or the Classic Editor. Finally, you can prevent users from having access to some blocks, or even stop them adding any new blocks.

  • Steve Burge

    Steve is the founder of PublishPress. He's been working with open source software for over 20 years. Originally from the UK, he now lives in Sarasota in the USA. This profile is generated by the PublishPress Authors plugin.

Leave a Reply

Your email address will not be published. Required fields are marked *