Now the roleassign module is use to limit what roles e.g. web admins can assign to other people. However the role_delegation module (https://www.drupal.org/project/role_delegation) offers more option in this regard and is more easily adaptable to specific client needs.

It would be nice to change roleassign with https://www.drupal.org/project/role_delegation with the basic setup the same as now, to allow easier changes.

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

daften created an issue. See original summary.

grayle’s picture

Does it do all the same things as roleassign? ie, prevent webadmins from editing users with a role they can't assign (superadmins)?

grayle’s picture

Actually hold on, I'm not sure roleassign does that or if that's a different module entirely. Lemme check

grayle’s picture

Nope, it's userprotect that does the editing stuff so we're all good, I'll replace roleassign with role_delegation

mohit.bansal623’s picture

StatusFileSize
new821 bytes

Replaced roleassign with role_delegation.

mohit.bansal623’s picture

Status: Active » Needs review

The patch is attached above. Please have a look.

brentgees made their first commit to this issue’s fork.

grayle’s picture

Status: Needs review » Fixed

  • Grayle committed 5ac074c on 5.x authored by brentgees
    [#3214898] change roleassign with role_delegation
    
    (cherry picked from...
daften’s picture

Status: Fixed » Needs work

Don't we need an update hook to uninstall roleassign and keep it in the codebase so it can be uninstalled?
Shouldn't we also do this for 6.x?

daften’s picture

Also, all the separate modules still have a dependency on roleassign in their info.yml file ...

daften’s picture

Created a quick patch to remove roleassign from the submodules too on 5.x, but this could break existing sites with custom roles, so as @brentgees said in a pvt convo, might be better to just undo this on 5.x

brentg’s picture

StatusFileSize
new4.16 KB

Added a patch that will replace roleassign also for the 5.x branch, since on the 5.x branch more work is required to get this working

Edit: not needed since It's basically similar to the one from daften

brentg’s picture

  • Grayle committed 4d32609 on 5.x
    Revert "[#3214898] change roleassign with role_delegation"
    
    This reverts...
grayle’s picture

Status: Needs work » Fixed

Reverted it for 5.x, 6.x has no features anymore so should be fine dependency wise

Status: Fixed » Closed (fixed)

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