[support] Administer a subset of users
Hi, I am developing a smart school site where one of the user roles is "collage". Users belongs to this role need to be allowed to administer a subset of users "students" in the site. The subset of users can be the users in OG group. The group admin need to be allowed to create, edit, block and delete users in the group context. I managed to achieve this by granting "administer users" permission to role "college" and with a custom module i altered the access callback for item 'user/%user/delete' and 'user/%user_category/edit' (to prevent admin from one group, editing or deleting the students account on other group). I guess this will have a potential security problem in future, would like to know if there is any module/ workaround/ hack to achieve this requirement in drupal way. Any help will be greatly appreciated. Thanks in advance. -- Sivaji
sivaji j.g wrote:
Hi,
I am developing a smart school site where one of the user roles is "collage". Users belongs to this role need to be allowed to administer a subset of users "students" in the site. The subset of users can be the users in OG group. The group admin need to be allowed to create, edit, block and delete users in the group context.
I managed to achieve this by granting "administer users" permission to role "college" and with a custom module i altered the access callback for item 'user/%user/delete' and 'user/%user_category/edit' (to prevent admin from one group, editing or deleting the students account on other group). I guess this will have a potential security problem in future, would like to know if there is any module/ workaround/ hack to achieve this requirement in drupal way.
Any help will be greatly appreciated. Thanks in advance.
http://drupal.org/project/og -- Earnie -- http://progw.com -- http://www.for-my-kids.com
On Wed, Sep 1, 2010 at 5:02 PM, Earnie Boyd <earnie@users.sourceforge.net>wrote:
sivaji j.g wrote:
Hi,
I am developing a smart school site where one of the user roles is "collage". Users belongs to this role need to be allowed to administer a subset of users "students" in the site. The subset of users can be the users in OG group. The group admin need to be allowed to create, edit, block and delete users in the group context.
OG module will not fit here. I am sorry if it is not explained clearly. What i would need is a way to allow some of the site users to create/ mange their own sibling user account. I know Drupal core doesn't handles this case and there is no contrib module for the same. A similar requirement is clearly explained here in d.o forum http://drupal.org/node/696664 <forum-snip> Our users are customers and they must be added by an administrator. Some customers should be enabled to create their own "subcustomers" and of course be able to edit and delete them. The problem is, that if you want to enable someone to add users, by default, there is only the "administer users" permission. They would have been enabled to edit all other customers as well with that permission. Of course, you could protect your users with the user_protect module or others, but then, the "customer admins" would not be able to edit their own subcustomers any more. </forum-snip> I posted this here to get core developer attention to see if there are any discussions going on to introduce this feature, unfortunately nobody has experienced similar requirement or reluctant to share their approach. The possible best solution recommended to me is to expose a version of the registration form to create sibling users. Hope this will help others. -- Sivaji
Earnie, I think you still can use og, but only use it for the user management not for the posts. Just create a dummy node type (my_people) so admins can add, edit, remove users. Other solution would be to add a profile field (admin only) and use it to store the creating user. Afterwards build a view that only show those users and use hooks to double check when editing Good luck, Peter From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of sivaji j.g Sent: zaterdag 4 september 2010 1:33 PM To: development@drupal.org Subject: Re: [development] [support] Administer a subset of users On Wed, Sep 1, 2010 at 5:02 PM, Earnie Boyd <earnie@users.sourceforge.net<mailto:earnie@users.sourceforge.net>> wrote: sivaji j.g wrote: Hi, I am developing a smart school site where one of the user roles is "collage". Users belongs to this role need to be allowed to administer a subset of users "students" in the site. The subset of users can be the users in OG group. The group admin need to be allowed to create, edit, block and delete users in the group context. http://drupal.org/project/og OG module will not fit here. I am sorry if it is not explained clearly. What i would need is a way to allow some of the site users to create/ mange their own sibling user account. I know Drupal core doesn't handles this case and there is no contrib module for the same. A similar requirement is clearly explained here in d.o forum http://drupal.org/node/696664 <forum-snip> Our users are customers and they must be added by an administrator. Some customers should be enabled to create their own "subcustomers" and of course be able to edit and delete them. The problem is, that if you want to enable someone to add users, by default, there is only the "administer users" permission. They would have been enabled to edit all other customers as well with that permission. Of course, you could protect your users with the user_protect module or others, but then, the "customer admins" would not be able to edit their own subcustomers any more. </forum-snip> I posted this here to get core developer attention to see if there are any discussions going on to introduce this feature, unfortunately nobody has experienced similar requirement or reluctant to share their approach. The possible best solution recommended to me is to expose a version of the registration form to create sibling users. Hope this will help others. -- Sivaji
If one account managing multiple users works, you might try http://drupal.org/project/subuser. On Sep 4, 2010 5:40 AM, "Peter Droogmans" <Peter@attiks.com> wrote:
Earnie,
I think you still can use og, but only use it for the user management not for the posts. Just create a dummy node type (my_people) so admins can add, edit, remove users.
Other solution would be to add a profile field (admin only) and use it to store the creating user. Afterwards build a view that only show those users and use hooks to double check when editing
Good luck, Peter
From: development-bounces@drupal.org [mailto: development-bounces@drupal.org] On Behalf Of sivaji j.g Sent: zaterdag 4 september 2010 1:33 PM To: development@drupal.org Subject: Re: [development] [support] Administer a subset of users
On Wed, Sep 1, 2010 at 5:02 PM, Earnie Boyd <earnie@users.sourceforge.net <mailto:earnie@users.sourceforge.net>> wrote: sivaji j.g wrote: Hi,
I am developing a smart school site where one of the user roles is "collage". Users belongs to this role need to be allowed to administer a subset of users "students" in the site. The subset of users can be the users in OG group. The group admin need to be allowed to create, edit, block and delete users in the group context.
OG module will not fit here. I am sorry if it is not explained clearly. What i would need is a way to allow some of the site users to create/ mange their own sibling user account. I know Drupal core doesn't handles this case and there is no contrib module for the same.
A similar requirement is clearly explained here in d.o forum http://drupal.org/node/696664 <forum-snip> Our users are customers and they must be added by an administrator. Some customers should be enabled to create their own "subcustomers" and of course be able to edit and delete them. The problem is, that if you want to enable someone to add users, by default, there is only the "administer users" permission. They would have been enabled to edit all other customers as well with that permission. Of course, you could protect your users with the user_protect module or others, but then, the "customer admins" would not be able to edit their own subcustomers any more. </forum-snip>
I posted this here to get core developer attention to see if there are any discussions going on to introduce this feature, unfortunately nobody has experienced similar requirement or reluctant to share their approach.
The possible best solution recommended to me is to expose a version of the registration form to create sibling users. Hope this will help others.
-- Sivaji
On Sun, Sep 5, 2010 at 1:15 AM, Adam B. Ross <grayside@gmail.com> wrote:
If one account managing multiple users works, you might try http://drupal.org/project/subuser.
This is exactly what i need. Thanks
-- Sivaji
Hi, Sorry but the bike has already been sold. I'm taking the ad down now. Thanks. Regards, Sam On Sun, 5 Sep 2010, sivaji j.g wrote:
On Sun, Sep 5, 2010 at 1:15 AM, Adam B. Ross <grayside@gmail.com> wrote:
If one account managing multiple users works, you might try http://drupal.org/project/subuser.
This is exactly what i need. Thanks
-- Sivaji
Sam Tresler 646-246-8403
participants (5)
-
Adam B. Ross -
Earnie Boyd -
Peter Droogmans -
Sam Tresler -
sivaji j.g