Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Config Role Split

Security covered Under active development 1,363 sites

This module allows you to manage role permissions separately from roles for different environments. It integrates with Config Split to add or remove permissions from roles during configuration import and export, offering different modes like split, fork, and exclude for flexible permission management.

Introduction

Roles in Drupal 8 are configuration objects and the permissions are a property of the role.
This means that permissions and roles are tightly linked for the configuration management.

Config Split and Config Ignore allow to separate some of the configuration for different environments. They do, however, not treat permissions separate from roles.

This project bridges the gap by in turn also using Config Filter to add or remove permissions from roles when importing or exporting configuration.

Help with the UI wanted

The beta1 version already does the filtering but the form for configuring this module is not very user friendly yet, patches for an improved UI are very welcome.

Key functionality

Modes

The role_split configuration keeps track of which permissions to add or remove. The following modes of operation are implemented.

Split

The roles and permissions are removed from the export and maintained only in
the configuration of the role split filter. When importing, the permissions
defined in the role are merged with the ones defined in the filter. When
exporting the permissions are *split* and the role will not have the permission
all the while the role in the active configuration will have it.

Fork

The permissions defined in the filter configuration are merged when importing.
But when exporting the exported role is checked first and permissions that
are already exported will not be removed from the export. Permissions that
are active in the sites configuration and defined in the filter but not in
the role in the sync directory are not added to the role in the sync directory.

Exclude

The permissions that are attached to a role in the sync directory that are
defined in a exclude filter are removed and will not be part of the active
configuration when importing. When exporting the permissions which have been
excluded will be added back to the role in the sync directory, provided it
already has them there.

See README for further information.

Ask your assistant about Config Role Split

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
2
Tracked since
Oct 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Slowing

Releases

Version Type Core PHP Release date
8.x-1.0-beta5 Pre-release 8–11 Aug 27, 2024
8.x-1.0-beta4 Pre-release 8–10 Oct 18, 2023