Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Permissions repository

No security coverage Under active development

This module provides an experimental replacement for Drupal's user permissions page, aiming to make it more user-friendly. It enhances permission management by allowing developers to define additional help text and group permissions into sections within `*.permissions.yml` files.

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

Ask your assistant about Permissions repository

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Dec 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core PHP Release date
1.0.x-dev Dev 11 Dec 19, 2024