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.

Command icon 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

john.oltman created an issue. See original summary.

john.oltman’s picture

Issue summary: View changes
john.oltman’s picture

Issue summary: View changes

  • john.oltman committed 3b715d74 on 3.0.x
    Issue #3404251: Roles are missing registration type dependencies
    
john.oltman’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.