Score:1

Restrict users from creating administrators?

fi flag

I want to give some users the ability to add and edit other users, but I don't want them to be able to add administrators (or for them to be able to give themselves or other users the "administrator" role).

This seems like something that would be commonly required, but I don't see any way to do it OOB, or any existing module.

Have I missed something or does this need doing as a custom module? If so, do you have any pointers on where to start? (Not with making custom modules, I'm familiar with that, but if you have anything to share about doing this in particular). Thanks!

EDIT: I can see how to stop users from assigning any role to other users, but I want them to be able to assign other roles, just not administrator.

cn flag
Role delegation does that; Role assign does the same but doesn't have a stable release; there are probably more, like you say it's a common requirement
fi flag
Thanks @Clive. It appears that role delegation has been discontinue (no support for Drupal 9) but replaced by https://www.drupal.org/project/delegate_permissions. Will check that out!
shelane avatar
cn flag
I use [Role Assign](https://www.drupal.org/project/roleassign) and despite it being a beta release, it has worked flawlessly for me for over a year.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.