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.

Supporting organizations: 

Project information

Releases