Organic Groups Field Access
In this video I’ll show you how to select which group fields are visible to members based on that group's roles.
Enable Access Control
- Enable the module: Organic groups field access
- Go to Configuration > Organic groups global permissions
- Scroll down to the section labeled: "Organic groups field access".
Here we can set which group roles can view and edit various group fields. By default anyone can view any group field, but no one is allowed to edit any group fields.
Just to show you how this works, I'm going to hide the body field from non-members.
- Simply uncheck the box next to "View Body field" under "non-member" and
- Save global permissions
If I remove Chelsea from Group #1, when she views the group page, she does not see the body field. If we check the box again and refresh, She can see the body field again.
You may have noticed that this setting filters down to content posted within the group as well. Since the "Article" content type also uses the "Body" field, users can or cannot see the article’s body field based on your settings.
A more practical use:
If you had a field that collected the physical address of a group, you might want the address hidden from non-members while members are able to see where the group meets.
Groups that override the default permissions will have all field access permissions disabled. This means that even though Chelsea is a member of "Group #2", she can't see any of the group fields.
If we go to "Group #2" > Click the "Group" tab > Then click "Permissions"
We see that all of the boxes under "Organic groups field access" are un-checked. Each group that was set to override the default roles and permissions before enabling the "Organic groups field access" module, will need to be edited to allow users to access the various fields.