Hello, I'm hoping someone could help me make sense of a few things. I've installed Organic Groups on a fresh install of Drupal 7 and have worked through setting up my group type as well as a content type to be group content.

All this went fine, where I seem to have hit a stumbling block is making sense of the permissions given to the user who initially creates the group. The user who has created the group becomes the 'Group Manager' and seems to have full permissions to the group no matter what I set on the 'admin/config/group/permissions' page.

Reviewing the code I came across this in the 'og_user_access' function:

// Group manager has all privileges (if variable is TRUE).
  if (variable_get('og_group_manager_full_access', TRUE)) {
    $entity = current(entity_load($group->entity_type, array($group->etid)));
    if (!empty($entity->uid) && $entity->uid == $account->uid) {
      return TRUE;
    }
  }

The above snippet explains why the manager seems to have full access and ignores the permissions set on the config page, but makes me curious as to what the reasoning behind this is. As best as I can tell there doesn't seem to be a way to set 'og_group_manager_full_access' so there's no way to control this behavior.

Secondly, I would have assumed that the user that creates the group would be automatically assigned the 'Administrator Member' role and be governed by the permissions defined for that role. This doesn't seem to be the case, instead, in my test, the user was just given the 'Member' role.

Essentially what I would expect is that when a user creates a group they become the group administrator and are governed by the permissions set for the 'Administrator Member' on the 'admin/config/group/permissions' page.

I'd be grateful to any explanation of the above, thanks in advance!

Comments

amitaibu’s picture

What is currently is missing in OG-UI is a an admin page to allow you to enable/ disable this option. It's on my TODO list. For now, you can use devel module's variable editor to set 'og_group_manager_full_access' to FALSE.

peronas’s picture

Ok gotcha. Thanks for clearing that up. I am still curious if there is a plan to offer more granular control over the group creator's permissions, or having them assume the 'Administrator Member' role upon group creation. I tried just assigning them the role after the group was created, but when I go into the 'admin/people' page for the group it doesn't offer the option to assign roles to the 'Group Manager'. Thanks again for taking the time to clarify these things!

amitaibu’s picture

Title: Group Manager and Group Administrator permissions confusion » Allow assigning roles to group manager
Category: support » bug

Right, not being able to assign roles to the group manager is a bug.

amitaibu’s picture

Status: Active » Reviewed & tested by the community

> Right, not being able to assign roles to the group manager is a bug.

Fixed on github -- https://github.com/amitaibu/og/commit/fe9f1f2d09273b61fc245e46975dae2018...

amitaibu’s picture

amitaibu’s picture

Status: Reviewed & tested by the community » Fixed

Committed to Drupal.org

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.