Active
Project:
U Create
Version:
6.x-1.0-beta3
Component:
ucreate_og.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 May 2010 at 10:37 UTC
Updated:
16 Aug 2011 at 16:41 UTC
Hi
I was wondering if there's a way to set up the module so that the adding user can only add users to groups he manages and not to groups he's a member of?
Thanks
Comments
Comment #1
jmiccolis commentedCurrently no, but there has been some discussion around this. It looks like OG already blocks people from being added to groups that are `OG_CLOSED` or `OG_INVITE_ONLY`. If you try using ucreate to add uses to these types of groups without being a member you should get the message:
So it looks like we should by default in ucreate hide these boxes, as really the don't work anyhow.
Looking at implementing this I've got one concern; to get the selective information is we're going to need to either load all of the groups the current users is a member of (potential scale issue), or hit the database directly. Before I explore that too deeply I'd like to make sure there is consensus around this behavior.
Comment #2
jmiccolis commentedThe `OG_CLOSED` issue was also brought up by another user: http://drupal.org/node/751692 I think the main point on that ticket is relevant here: when a group is closed (only group managers can add people) we should try to respect that in ucreate.
Comment #3
haffmans commentedNote that despite the warning message, it seems that (in 6.x-beta3, og 6.x-2.1) group members are still added to the closed groups; I at least noticed that behavior. This happens if you are a member of the group, but not an admin. Also, the groups are already loaded (at least the necessary parts) when the form is created, so I think all necessary data is already available. Hence solving this shouldn't create any additional scaling issues.
So basically filtering the group options list by checking the necessary settings (including checking if the user is admin of the group) should work. For this, the
_ucreate_og_form()function (ucreate_og.module) already has$group->is_adminavailable. I'm guessing$group->selectiveindicates if the group is private or not, but I'm not sure. Filtering there would remove the options from the form, and should thus also make adding users to such groups impossible.Comment #4
gorgo commentedhey,
Thanks for all the quick replies!
Actually none of the groups on the site are closed.
They are all open and anyone can join.
I just want group admins to have the ability to add users to the site and automatically, add them to their groups.
The problem is that group managers are also able to join other groups as members and I don't want users they create to be added to groups they are just members of.
I tried to "solve" this by blocking group managers from joining other groups with a module called 'join group by role' (or something similar to that). Unfortunately it didn't really work, and I noticed other users had similar problems with that module and couldn't find solutions that worked for me.
I would prefer it if group admins could still be group members in other groups and only show group they manage on ucreate...
Comment #5
danepowell commentedsub... I'm also seeing the behavior mentioned in #1 where if the manager is not a group admin and tries to add a user to the group, they will get a notice but the user will still be added.