Organic Groups Field Access
Written Steps
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
Configure Permissions
- 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.




Comments
Question about permissions
I have OG installed and the users do not have the ability to view the content create links. Does this need to be setup in the core permissions for authenticated users first?
Yep
Yep, this is explained in Part 6: Allow Group Members to Post Content.
Excellent tutorial, thanks
Excellent tutorial, thanks
Excellent tutorial, thanks
This is excellent tutorial, hopefully you will come with other similar tutorials, thank you
I've watched through all your
I've watched through all your videos and they're extremely helpful. I appreciate it. However, I am curious if there is a way to adjust the OG settings depending on the content types that are set as groups...
Some further explanation...
I want multiple types of groups. The first is just a "Group" and the second is a "Company". I want the different group-types to have different behaviors and permissions. For example, I'd like the "Group" group-type to ALWAYS be public/open. Meaning: all posts to the "Group" group-type will have public visibility AND that all people who want to join a "Group" can. Then... for the "Company" group-type, I'd like to enforce a "request membership" model. Additionally, I'd like the content that gets posted to a "Company" group-type to ALWAYS be set as private visibility.
I hope that makes sense. My concern is that when I set permissions, settings, etc. those get set across ALL OG group-types.
This totally makes sense
This totally makes sense, and in fact, has been requested so much that it is one of the major new features in the 2.x version. Currently the 2.x branch is in dev, but if your interested, you can check it out. Also, if you're interested, you can see Amitai (OG7 maintainer) describe the updates in his DrupalCon presentation last week. (He begins with a quite funny monologue, but if you're only interested in the OG stuff, skip to about 7:30)
Thanks for all the help! Do
Thanks for all the help! Do you know of any good tutorials for the 2.x branch? I'm struggling to find much this early on in its development and while I am pretty experienced with development myself, I still haven't gone deep enough into Drupal to understand exactly how all the gears are spinning.
Great series
Thanks a lot!
Thank you, Brian!
Thank you, Brian!
Thanks
Very well done. enjoyed it.
(make more ;-)
Tomer
Great work - minor issue
Hi - refering to the statement at 1:35 that "the settings filter down to content in the group. Just a warning that currently, as far as I can tell, the notion of the permissions cascading down to content only works in as much as it works when 'editing' but not when 'creating' eg hiding the content visibility field via these permissions means a group member does not access this field when editing eg a Group Post - but does access the field when creating the node - which obviously defeats the purpose.
Question regarding OG field access
I've enabled the Organic groups field access module, and noticed that I was able to lock down all fields for editing EXCEPT the title field, which doesn't seem to appear as an available option to administer within the Organic groups global permissions - Organic groups field access section. I'd love for the group members to have the ability to edit only the fields that I've unlocked for editing, but I definitely don't want them to be able to edit the title.
Make sense?
Excellent tuorial
Excellent tuorial
One more question
Maybe I'm too bad know English (it's true). But I have a question: why non-member, but authorized users see the link "node create links" in OG? How to make the link was only available for "member"? What lesson to study in more detail? Or something else? Thank you.
Sorry. Question is solved. It
Sorry. Question is solved. It was very simple, actually.
Great Tutorial
Getting back into Drupal, it has been a long time since I have played with it. I saw something about organic groups that seemed like it would fit my current project, but soon found out organic groups were not so straight forward as you might think. I found your tutorial and feel like I have a high level of understanding of how they work. Thanks for the video tutorials, they were of great quality as far as content presented.
谢谢!
看完了~great!
allow group managers / users to make some group content public
is there a way that would allow group managers to make some posts made within OG publicly visible and thus also included in the group stream?
Yep. That's covered in part 4
Yep. That's covered in Part 4
magnificent!
magnificent tutorial!
Awsome tutorial
Thank you, just great !