Closed (fixed)
Project:
Organic Groups
Version:
master
Component:
og.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2007 at 08:53 UTC
Updated:
23 Jun 2009 at 04:40 UTC
As a group manager (owner), I can make one or more subscribers as the administrator of the group.
But what can a group administrator do? I tried logging as the group administrator, the user seems to behave just like a regular subscriber. I thought the user would be able to add susbribers, approve registration, etc. But it doesn't seem to be the case.
Am I missing something?
Comments
Comment #1
rjl commentedI was wondering the same thing...
Once I enabled 'Access Control' (in the first section in the OG settings page), then administrators could edit nodes - not the actual group node - but nodes in the group.
I was also hoping that administrators could also edit the group node and the functionality mentioned above (add subscribers, etc, send mail, etc.)
Comment #2
rjl commentedAfter looking at the og.module code (I know I should have done this before my post above)...
It appears that access to a number of these administrative functionalities is defined using the node_access() function: node_access('update', $node) as in the following
The node_access() function is complex.
The function allows users with 'update' permission on the (group) node to perform these functionalities. The 'update' permission is checked for in several places to see if the user has the permission.
With OG setttings: Access Control = Enabled...
(note I could be way off base with this part)
1. It appears the OG module adds the extra permissions to the node_access table for the node types that are children of the (group) node. This then gives (group) 'administrators' the ability to edit child nodes of the (group).
2. The OG module does not appear to add extra permissions to the node_access table for the (group) node. Permission seems to be limited to users with 'edit own (group) content' or 'edit (group) content' access. This would deny a (group) 'administrator' permissions unless he/she was the author of the (group) node (assuming he/she has 'edit/own' access).
I guess there is a big question that needs to be answered (and has probably been answered before, I'm not sure where though). What additional permissions should an 'administrator' have?
1. Add/Remove subscribers
2. E-mail subsribers
3. Add/Remove 'administrator' status to subscribers
4. Edit/Delete child nodes of the (group)
5. Edit/Delete the (group) node
I would imagine that each person would have a different answer to the question depending on their particular site.
Personally, I am not concerned about the last two items regarding nodes. I would like to have options for the first three items regarding subscribers. The rest of my comments are only in regards to those subscriber related permissions.
One easy fix would be to say that 'administrators' have those permissions. The change in the module's code would be fairly simple:
all instances of
would be changed to
each function would also need to be checked to see that it included the current user object, as in:
Another fix, more complicated, but more flexible, would be to provide variables (defined on the OG settings page) for what an 'administrator' can do.
I see 5 variables for providing a fair amount of flexibility and not too much overhead:
- Add Subscribers - var: 'og_admins_add_subscribers'
- Remove Subscribers - var: 'og_admins_add_subscribers'
- Email Subscribers - var: 'og_admins_add_subscribers'
- Promote Subscribers To Administrator - var: 'og_admins_add_subscribers'
- Demote Administrators to Subscribers - var: 'og_admins_add_subscribers'
Add this code to the og_admin_settings function
then all instances of
would be changed to
where ***** would be the appropriate variable for the appropriate functionality
each function would also need to be checked to see that it also included the current user object (as above)
Examples:
function og_approve would check the variable: 'og_admins_add_subscribers'
function og_deny would check the variable: 'og_admins_remove_subscribers'
etc...
One issue would be the subscribers list provided by
function og_list_users_page: this function provides the 'options' column for subscribers and provide links to all the functionalities except emailing.
in the funtion, the line
would be changed to a general admin check
and specific admin permission checks would need to be added
then this section of the function which provides the links to the various specific functions
would need to change to this which includes the checks for the specific functionalities
These are just some thoughts and ideas I had. Sorry I'm very good at making patch files or I would have done so. The code is working, but should be tested of course.
Comment #3
moshe weitzman commentedindeed, this seems to have become broken a long time ago. i will likely fix this by putting group nodes into the node-acces ssystem and giving an update grant to group admins. this is related to the private groups issue, so it might be little while before i fix it. not too long though. i recognize that it is a critical bug.
Comment #4
yched commented+1 for a fix when you, er, have some time ?
Comment #5
moshe weitzman commentedfixed in HEAD and D5. a release forthcoming soon ...
Comment #6
(not verified) commentedComment #7
dgtlmoon commentedI'm still seeing this issue as part of the release http://drupal.org/node/302406 (5.x 8.x-dev)
As a user, i can create an og group, however i cannot edit that group once it is created, even tho i am the nodes owner
Do I need to enable og_access ?
Comment #8
kkrgopalan commentedsubscribe - facing a similar problem
Comment #9
ianchan commentedsubscribe
Comment #10
moshe weitzman commented#7 - yes.