It would be useful to have a hook that allows altering the return value of DelegatableRoles::getAssignableRoles().

One use case is that it would allow granting the assignable roles in the alter hook instead of permissions. That would work-around #3354012: Adding non-existent permissions to a role is not allowed.

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

Liam Morland created an issue. See original summary.

liam morland’s picture

Status: Active » Needs review
StatusFileSize
new3.68 KB

Here is an implementation. It does not use dependency injection. If the maintainer agrees with the intent of the patch, I can write it with dependency injection.

dieterholvoet’s picture

Status: Needs review » Needs work

Looks good! Only the dependency injection left to be done.

liam morland’s picture

Status: Needs work » Needs review
dieterholvoet’s picture

Status: Needs review » Needs work

Left some comments in the MR.

liam morland’s picture

I replied.

dieterholvoet’s picture

Status: Needs work » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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