Restrict group content to group members in Commons 7.x-3.0

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by simon.chisnall on March 8, 2013 at 3:07pm

Hello everybody,

Firstly I want to apologise in advance if this is the wrong place for this question, if so please advise where I should post it.

I've recently started a project using Drupal commons 7.x-3.0, the prebuilt events and functionality is great.

However one of the requirements is that only a (public) group member can associate group content with a (public) group.

I understand that commons is built to allow anybody to post into a public group however I thought I could just remove this functionality.

I found the commons_groups_og_user_access_alter() function and commenting out the $temp_perm["create $type content"] = TRUE; line does make the content links block display correctly. I.E the block only displays content that the user has privileges to create via their og group role.

However if the user creates a node (ie /node/add/post) the group reference field still allows selection of groups they are not a member of.

I have tested standard og groups and that seems to be the functionality, it will restrict the referencable groups to ones the user is a member of. I just can't figure out how Commons is overriding this .

Any help would be appreciated.

Thanks
Simon

Categories: ,

Comments

i need this info too

Posted by kazar on March 28, 2013 at 1:16pm

I have been watching Commons 3 to see if it will satisfy requirements for a project ... it seems a pretty clear-cut rule that only group members should be able to associate content with a group.

(a feature that lets a non-member offer content to a group would be nice, but perhaps this is the bells-and-whistles category)

Does anyone have a response to the OP? thanks

kazar

Subscribe

Posted by mastroirmo (not verified) on May 31, 2013 at 3:31pm
mastroirmo's picture

Subscribe

https://groups.drupal.org/node/287148

Drupal Commons

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /