4

I have defined a role in which I'd like to grant:

1) Permission to edit users

2) Prevent from creating new users

Is this possible? I only see one permission under User called "Administer users" which looks like grants both abilities.

Thanks

3

You might want to use the Administer Users By Role module. The 7.0-2.x version depends on the Chain Menu Access API.

After both modules have been installed and enabled, you will be able to grant user edit but not user add permissions to certain roles within the /admin/people/permissions form.

Nice side-effect: The user editors won't be able to alter the site admin's profile, if you don't allow it, as it could cause serious problems.

  • Is there a workaround to achieve this in a custom module and not use those modules? – farjam Jan 31 '16 at 15:58
  • I remember having seen you asking another question the same time as the above one, regarding checking additional user permissions in a hook_form_alter(). Found that this approach - well done - would be a reasonable alternative. May I ask why you don't like to use the above modules? – Mario Steinitz Feb 2 '16 at 6:27

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.