Closed (fixed)
Project:
OG User Roles
Version:
5.x-2.7
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
3 Dec 2007 at 19:46 UTC
Updated:
4 Apr 2008 at 06:52 UTC
Jump to comment: Most recent file
The existing options:
1) "Default Basic Group Role for new group subscribers." applies to all subscribers.
2) "Default Founder Role for users who create groups." applies to all group owners (creators)
3) What about subscribers who become group admins?
I'd like to be able to specify a role that group admins acquire. This has an excellent use case, whereby normal users are not able to add certain content. Group admins would be able to edit all content in the group and create all sorts of new content only within that group.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | og_user_roles.module.5.x-2.8.patch | 5.31 KB | somebodysysop |
Comments
Comment #1
somebodysysop commentedThis one probably isn't so tough. You would apply the role when a user is made a group admin. However, this one:
Remember that the founder is also a group admin. Should he get the group admin role also? If so, then how do we make this happen retroactively since one may have several groups already when you apply this?
Comment #2
scedwar commentedI would say yes, for the moment, as I can't imagine a situation where you would not want to give the owner at least the permissions a group admin has. How to do so retroactively? For my purposes, I don't mind, but I assumed it could adopt the same behaviour as the existing code for group owners and group members (but I don't know what that is!). For my particular purpose it won't matter.
Comment #3
somebodysysop commentedSo, your suggestion is to have an option to automatically assign a role to a user who becomes a group admin? That means if the user is demoted from group admin, the role will need to be revoked?
Comment #4
scedwar commentedYes. It is simply a way for an owner (or admin) to elevate a single user to an admin status both for the group and as a role within that group. As it stands, a group admin does not have much control over the group content beyond that of a normal member.
In my scenario, this would allow a user to become a moderator or editor for all posts in a group, but not outside the group. This has been requested as a use case on groups.drupal.com, and this would be an implementation of that.
Comment #5
somebodysysop commentedThe idea here is to automatically assign a role to a user when he is promoted to group admin. The problem is what to do when a group_admin user is demoted.
The process in OG which creates/updates group admins is this:
The problem is that we don't know when a user is being demoted. This line could refer to any new user who is not an admin:
My guess is that I would use hook_og('user insert') or hook_og('user update') to find out the "is_admin" status of user being inserted or updated:
If $status == 1
If $status == 0
The problem is that every time a user is inserted or updated, I would have to run this query. Not efficient. Also, if a user is manually assigned the group admin role, and is not a group admin, the role will automatically be deleted.
What do you think?
Comment #6
somebodysysop commentedApply the attached patch to a clean download of the 2.7 release.
Comment #7
somebodysysop commentedNo response. Will assume this is fixed.
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.