Installation of Drupal fails when having dynamic permissions based on a config entity added during installation

Created on 22 June 2023, about 1 year ago
Updated 18 September 2023, 10 months ago

Problem/Motivation

This bug was discoverd by @DieterHolvoet in πŸ› Adding non-existent permissions to a role is not allowed Active .
Role delegation is a module that provides dynamic permissions, by using a permission_callback, based on the available roles on the website.
When there is e.g. a role "Moderator", Role Delegation, provides a permission "assign Moderator role".

When creating an install profile, and in your install profile, the role "Moderator" has the permission "assign Moderator role", the installation fails because the permission doesn't exist at that moment.

Original description:

When installing a site with the config of a role that has permission to assign its own role, an exception is thrown which causes the site installation to fail.

Steps to reproduce
Create an install profile providing an editor role with the assign editor role permission.
Set up a new site with the install profile. The installer will show The website encountered an unexpected error. Please try again later. RuntimeException: Adding non-existent permissions to a role is not allowed. The incorrect permissions are "assign editor role".

- @DieterHolvoet

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
InstallΒ  β†’

Last updated 2 days ago

No maintainer
Created by

πŸ‡§πŸ‡ͺBelgium JeroenT πŸ‡§πŸ‡ͺ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024