1

I have created a role called "Site Admin" and created a user with that role. When i log in with that username. "People" menu is showing in toolbar only when we give "adminster user" permissions to site admin. But when we give adminster user permission site admin can see and edit users in the site. These includes our main administrative users. How can i give permission so that site admin can only see the users excluding administrator user?

  • administrate users permission means just that. I think you’d need a contrib module to do what you’re asking. – Kevin Jul 28 '18 at 17:29
3

That's kind of a "asking for a module to do X" question, which is not really allowed but I do think it is a very common task.

There are a few approaches/modules to this, we are using the combination of https://www.drupal.org/project/userprotect to prevent users from editing users that already have the administrator role, and https://www.drupal.org/project/roleassign to prevent them from giving the administrator role to a user that they are allowed to edit.

There is also https://www.drupal.org/project/administerusersbyrole, which in the 8.x-2.x branch attempts to solve this without requiring users to get the administer users permission, which is more safe, but it also requires core patches because a lot of things in core itself can't really deal with users being able to edit other users without that permission yet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.