Dream permissions

The Drupal 7 admin/people/permissions is always been troublesome for big Drupal sites, there are some flaws

  1. PHP renders all checkboxes for all roles at once (yes, I know you can limit it to 1 role)
  2. The javascript part adds a lot of dummy checkboxes
  3. If you want to edit the roles (or open the permissions for only one role) you have to open the permissions page first, to be able to click on the tab of the roles
  4. There's no link from admin/people to the roles page
  5. All modules are shown on the permissions page, most of the time you only want so set permissions on a few modules.

We created a new module - Dream permissions to solve most of these problems. It started when one of our projects ended up with 32000 checkboxes on the permission page, with a load time of 20 seconds and basically killing the browser.

Setting permissions has become a 2-step process.

Selecting the relevant roles and modules

The first screen allows you to

  • select the roles you want to set permissions for, we added a filter so you can easily reduce the list of roles.
  • select the modules you're interested in, and similar to the roles it has a filter as well.
  • limit the returned permissions by a part of the name (both human readable and machine name are supported).

Setting the permissions

The second page only shows you the relevant permissions, at the top of the table there's even a filter to easily show the permissions you're interested in.

If your browser supports javascript all of the above is done without needing a page reload. If javascript is disabled or not supported it still works, but you get more page loads, making it a bit slower.

General settings

At admin/config/people/dream_permissions you can set some general settings like

  1. Replace the build in permissions page, avoiding people using it
  2. Exclude roles from the available roles
  3. Exclude modules from the available modules

Drupal 8

For the moment there's no Drupal 8 version available, if you want to track the progress, keep an eye on this issue. If you want to have a Drupal 8 version, but are not able to code it, feel free to contact us.

Dream permissions