1

When an administrator (except user 1) editing a user how to hide "administrator" under role in a user edit page in D7 site? or how to prevent assign a role of administrator while editing a user?

4
  • 1
    you can try out this module drupal.org/project/administerusersbyrole Feb 1 '13 at 11:57
  • Downloaded the module, activated and configured but :( not worked. Still the role editable while editing a user. I want like First user able to edit second user's role but not able to assign him a administrator role.
    – bane
    Feb 1 '13 at 13:28
  • have you given the administer users permission to the role? Feb 1 '13 at 13:30
  • Yes. Given 3-4 times and each time I have cleared cache but not worked.
    – bane
    Feb 1 '13 at 13:34
2

I believe the RoleAssign module can help you with that:

RoleAssign specifically allows site administrators to further delegate the task of managing user's roles while withholding the Administer permissions permission.

RoleAssign introduces a new permission called Assign roles. Users with this permission are able to assign selected roles to still other users. Only users with the Administer permissions permission may select which roles are available for assignment through this module.

2
  • This module not worked for me. Just I don't want to display the default administrator under role in user add or edit page. It is just like authenticated user is hidden. any solution please?
    – bane
    Feb 1 '13 at 12:31
  • @bane did you find any solution? May be I can help
    – Umair
    Jan 14 '19 at 10:33
1

Use the role delegation module.

It gives new permissions to restrict the roles that are allowed to be assigned.

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.