Problem/Motivation
The "per registration type" permissions are not adding a dependency on the registration type to roles that use them. This could result in the exception RuntimeException: Adding non-existent permissions to a role is not allowed when updating roles, if a registration type is ever deleted.
Steps to reproduce
Add a new registration type. Assign per-type permissions to a role. Delete the registration type. Attempt to update the role - an exception occurs during save.
Proposed resolution
Redo the Registration permission provider to leverage the core BundlePermissionHandlerTrait which adds the required dependencies. When a registration type is deleted, the dependencies trigger removal of permissions that no longer exist from any roles that use them.
Issue fork registration-3404251
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
john.oltman commentedComment #3
john.oltman commentedComment #6
john.oltman commented