Restrict Role that new user can be created in - by non-admin user

xstatic - June 26, 2009 - 15:45
Project:U Create
Version:6.x-1.0-beta2
Component:ucreate.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Thanks for a great and very useful module! The one thing that this does not do, that I desperately need is that it does not appear to be able to limit the roles in which a non-admin user can create a new user in.

Example:
I have the following roles: "Corp", "Manager", "Instructor", "Student"
A Manager is an admin in it's Organic Group "ABC School" so I want to use UCreate to allow Managers to create new users in the their OG but I also need to limit the roles in which they can create a new user in, to only Instructors or Students. I do not want to allow them to create a new user with the "Corp" or "Manager" roles.

If you do not think this would be needed as a global add in the module, could you possibly give me a "personal patch" to apply to the module, so this would work for my scenario?

Would be greatly appreciated!!!

#1

recrit - June 30, 2009 - 05:25

I was looking for similar functionality in this module. I have a made a quick patch - nothing fancy or official, but it gets the job done. This patch will add an Excluded Roles section to the ucreate admin settings. Just select the roles that you do not want available to those with 'create user' permissions.

This patch applies to 6.x-1.0-beta2.

to apply patch:

patch -b -p0 < ucreate_excluded_roles.patch

AttachmentSize
ucreate_excluded_roles.patch 1.17 KB

#2

xstatic - June 30, 2009 - 14:41

recrit, absolutely perfect!
Exactly what I needed!
Thanks for the patch and your perfect timing... I have to deliver this project tomorrow!!!
...you rock!

#3

recrit - June 30, 2009 - 16:51

no problem. Good to hear everything worked out for your project.

 
 

Drupal is a registered trademark of Dries Buytaert.