Extending Drupal 7 Block Permissions

Sep
04
0

Drupal 7’s block module can be a little limited in its permissions; “Administer Blocks” is a rather sweeping capability, and often it’s useful to be able to make it that bit more granular.

For example, you may have a number of blocks throughout the site but once they have been placed in the correct region and the visibility correctly configured (which often isn’t the simplest of processes), you don’t want content managers to change those settings. You do, however, need to allow them to change the title as it appears to site visitors, and of course the content. This isn’t possible out-of-the-box; luckily, it’s not that hard to do.

Inspired by kiamlaluno's post on Drupal Answers along these lines, I’ve knocked up a simple module to make permissions granular enough for just a situation.

It’s incredibly simple and somewhat limited, but it does enable to you to grant or deny access to each part of a block’s configuration, i.e.:

  • the title as it appears to users
  • the description as it appears in the back-end
  • block content
  • the regions the block is assigned to
  • visibility settings

I’ve put the code on Github for now; download, install & enable, then you’ll find five new permissions under block_extended_permissions. Hope you find it useful.

Posted

September 4th, 2011

Category

Drupal

Comments

no comments

 

No comments

Add your comment

The content of this field is kept private and will not be shown publicly.

About Me

Lukas White, LAMP Developer Manchester

I'm a web developer based in Manchester, England. I also design websites.  I generally favour open-source technologies such as PHP, MySQL and JQuery, and I have extensive experience using Drupal.

Read more »

Recent Comments

2 weeks 6 days ago kc6ape commented on Using an Additional Database in Drupal 7:

Lukas,
Thanks so much for posting this, could you possibly help a newbie out and show...

Read more...
6 weeks 1 day ago Anonymous commented on Using Less, the Dynamic Stylesheet Language, in Concrete5:

Hello,
I'm using bootstrap with Less .
I'm trying to get this package to work with...

Read more...
6 weeks 5 days ago Sean J commented on Using Less, the Dynamic Stylesheet Language, in Concrete5:

Thanks for the add-on! I'd love to use it but when installing I was told it was incompatible...

Read more...