I would like to talk permissions. I went wayward quite a bit and would like to have a sounding board for what I think I've grasped.

In Drupal, we usually use the admin/people/permissions(/roles) to create roles and assign them permissions. With Open Atrium 2, this is no longer the case [Insert possible exception use cases here]. Open Atrium was built with Organic Groups. Organic Groups are described as a "collection of stuff + permissions" here (say goodbye to using permissions at admin/people/permissions).

Organic groups requires you to build group types (by creating a content type, and setting the appropriate settings which designate it as a group type [How to do this]) and create group instances (aka. the actual groups) (in drupal speak these are Nodes of the Content Type you just created) using those group types. Permissions (and roles) are then (and forevermore) set for the groups types [How to do this, including making sure you have permissions to do so] (Confusingly enough, the beginning of this link talks about editing permissions/roles for a group instance/node, which I will now introduce below).

There is a nifty field that you can add to your Group Content Types called OG Override Permissions and Roles. This is NOT referencing the overriding of group permissions/roles with admin/people/permissions, but a field that will allow you to create specific permissions and roles for any group node/instance which will override the roles/permissions set for the Group Content Type [See it in use here].

In Open Atrium, we can see the above in action. They have a Space content type (which is a group, and I'm thinking not at all related to the Spaces module.. which I may have read somewhere but can't remember now). They also have a Group content type. I'm not sure what the benefit is for having a Space and Group content type. Though I guess you can have members of the Space, and than groups be a member of that space as well. Not sure why those two would need different permissions though...

Comments

SweetTomato’s picture

Issue summary: View changes
Argus’s picture

Thanks for the detailed writeup. The permissions in OA need some good documentation pages, this might be a good start. You are correct about Spaces not being related to the Spaces module. As for why there are 2 group types, Groups and Spaces: this will make it possible to separate access control on a user level from access on a content level. Thus making more complicated structures possible, like this example.

jkingsnorth’s picture

Title: Open Atrium Permissions » [Documentation] Open Atrium Permissions

Adding this to the larger meta issue regarding documentation.

erok415’s picture

I can help with this. I believe we have some internal documentation regarding this issue.

amstercad’s picture

To use discrete content permissions within OpenAtrium Spaces, first inspect the defaults at:
admin/config/group/permissions
These defaults apply to every OA space.
To override defaults for any space:
Go to the space and click edit.
At the bottom of the page there is a check box “Override default space options” Check this box.
Just above this box is the “Inheritance” fields. You'll first notice the following options:
• Yes - subgroups of this group will inherit its users.
• Inherit Permissions - inherited users will also same permissions as this group
Both are on by default.
Under “Group roles and permissions” choose “override default roles and permissions”
Save the form.
Now at the top right hand side of the page click on the gear and choose Config. Under Config choose “permissions” and you can set the permissions that will apply to this space only.

paean99’s picture

This is my reasoning based in my experience. It is just the way i see it, as i am far from being a specialist in the subject :)
Drupal permission are global i.e. they are the same for every users. The normal way to go beyond this limitation is to use roles which create a partition of permissions. But the roles are global too. We can see this in the fact that a role's permission for a content types is the same for all the instances of that content type.
Organic groups goes a step beyond that by grouping instances of content types (for ex...) and localizing all the power of permissions and roles to them. Organic group have two ways of doing this.

  1. The first is by having the same permissions and roles for all the groups, but relative to each group. i.e. A certain role exist in all the groups, but a user with that role in a certain group might not have it in another group.
  2. The second is by having distinct permissions and roles for the different groups.

It is one of the reason why peoples say that if offers a way to create multisites...
I think the view that i just described is just a good approximation because Organic group goes beyond this with the membership entity. The groups (and others) are created by the addition of a group field to a content type. The users receive a membership field that reference a junction entity that creates a relation between users and groups. The content of the group has another field... With this users can even become groups by themselves, useful to create facebook like sites...
It is where we really see the power of the drupal entities in action, as it is also seen in the commerce module and others.
Finally we come to Open atrium.
It creates two types of groups, one of users, another of content (spaces, sections, content types, ...). With this decoupling it is possible to create very complex two dimensional (user/spaces) hierarchical structures. It seems to me a more rigid structure than the simple organic group one. But it rigidity also gives strength to create higher and bigger buildings of complex interaction.

Argus’s picture

Argus’s picture

Created a doc page: https://www.drupal.org/node/2340349

Please check, correct and update.

jkingsnorth’s picture

Thanks Argus looks like a good starting point for sure.

SweetTomato’s picture

Didn't know if this fit in there somewhere, as in applies globally to how OA is set up (or just in that particular case), but it was on this (http://www.phase2technology.com/blog/workflow-within-open-atrium-2/) page. "Permissions in Workbench Moderation are a bit backwards from the norm: submodules *revoke* access rather than *grant* access. Typically this means you will set the Drupal Workbench Moderation permissions (including View Unpublished content) to be allowed for all authenticated users, then use OG permissions to restrict to Members and/or Space Admins, then optionally use OA permissions to restrict to Groups/Teams."

Argus’s picture

added that, thanks.

rol’s picture

--

rol’s picture

-

edmarmota’s picture

It's there a way to add a new OG role to the default contextual menu inside Spaces, so an adminstrator could promote a member to that role? Also the tabbed page only show members and administrators, and the spaces OG roles has an additional role.

mpotter’s picture

Please don't post support questions to Documentation threads. Please open a new issue for your question.