This project is not covered by Drupal’s security advisory policy.

This is an experimental drop-in replacement for the user permissions page (admin/people/permissions). It adds new features to *.permissions.yml files that provide additional help and groups the permissions for a module into sections.

The goal is to make the permissions page less arcane for new users.

See the image on this page for the sections and the additional help (shown when you mouse over the question icon).

Features

This is the permissions_repository.permissions.yml file that resulted in the image above:

main:
  extended_help: 'These permissions deal with the Permissions repository module. You can probably use the default settings, however, if you want to do [ABC], you might want to [XYZ]. Another possible use case is [ABC2]. In that case  [XYZ2].'

section_callbacks:
  - \Drupal\permissions_repository\Controller\PermissionsRepositoryController::getSections

sections:
  - title: users
    weight: 1
    extended_help: 'another thing, another thing, another thing'
  - title: admin
    weight: 2
    extended_help: 'something, something, and something'

'access_something':
  title: 'Access something'
  description: 'Get an overview of all something.'
  weight: 1
  section: 'users'
  extended_help: 'Users with this permission can view the page [ABC]. Theyll be able to see [XYZ], [ABC2], and [XYZ2]. So, you should only give this permission to users who need to see [ABC].'

permission_callbacks:
  - \Drupal\permissions_repository\Controller\PermissionsRepositoryController::getPerms

The first 'extended_help' will be shown in a popup next to the name of the module. The permissions will be grouped by their section. The 'section_callbacks' return an array of section definitions, similar to how the existing 'permission_callbacks' work.

Post-Installation

This module is intended for developers. After enabling it, change your permissions.yml file as shown above.

Additional Requirements

This module has a soft dependency on the tooltip module. It's not a hard dependency because of https://www.drupal.org/project/tooltip/issues/3394050 so if you want to see the help popup, the easiest way for now is to download the zip of the tooltip module, remove the ckeditor dependency from tooltip.info.yml, and then enable that module.

Supporting this Module

Your generous support will help support new versions:
https://www.paypal.com/donate/?hosted_button_id=4U3VYC5LNWRM4

Project information

Releases