I want to make an Organic group private,to be seen only from members of this group. All the other will get an "Access denied" or something like that. For the time being,I can see the Group but not its content. I would also want NOT to be able to see the existance of the group,if I am not a member of it. I am working on Drupal 7. How to do that? Thanks
You need to enable og access control module.
see below:
Then navigate to admin/config/group/fields, add an visibility field to your og bundle
Then edit the og bundle content type, there is a new field added to it, make your change for public or private
-
weirdly enough, I got the same setup and it isn't working. A user that does not belong to the group can visit it without any problem :/ – magtak Aug 8 '12 at 12:41
-
2
-
1
-
-
1I was able to get the two access modules to play nicely by lowering the priority for the Content Access module. While editing access for a node type (
admin/structure/types/manage/TYPE/access
), there is an Advanced fieldset near the bottom of the page. Inside that fieldset is the option Give content node grants priority. Setting that below the priority of the OG Access grants will solve the problem (setting it to -1 worked for me). The Devel node access module was helpful in debugging the issue. – thirdender May 8 '14 at 4:58
Please consider that to make a group truly "private" you have also to remove the "register" permission for non-members otherwise even if the group is "private" non-members that can guess its nid can subscribe (at http://www.example.com/group/node/[nid]/subscribe) and hence view the group's content [OG 7.x-2.2].
This required additional steps for me. Also an unfortunately specific recipe. Viewing node_access
records using Devel Node Access module & block provided some pointers.
Admin > People > Permissions
Set Anonymous and Authenticated to can view contentAdmin > Modules
Enable OG permissions via Organic Groups Access Control moduleAdmin > Configuration > Organic Groups > OG Field Settings
Add visibility controls (fields) to group node-typesConfigure other NAC modules, Content Access in my case, to weighted less than, before, OGAC.
Defaults are now allow viewing, unless set by the group-type node. If you change content visibility from a group page, the subpages have to be resaved or drush php-eval 'node_access_rebuild();'