Closed (fixed)
Project:
Drupal Commons
Version:
7.x-3.2
Component:
Groups
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2013 at 19:06 UTC
Updated:
5 Sep 2013 at 14:51 UTC
I have created a new group type called "Store" and have a content type called "Product" which can be added to store nodes. I want to only allow the store creator to be able to add products to the store. Currently a user can add a product to any store created by anyone.
On the OG Node Permissions page this is show:
In addition to the permissions listed here, the Commons Groups module grants non-group members the ability to post content into groups where content in the group is public.
This shows that this is how commons groups was designed but I want to know then how can I stop this behavior of allowing anyone to products in a store group.
Comments
Comment #1
doors commentedI just want to know how to disable the feature of granting non-group members the ability to post content into groups where content in the group is public.
I want a group and it's content to be public but not allow persons who are not members of the group to be able to add content.
Can someone please provide some help.
Comment #2
rosemeria commentedSteps - finding OG permissions (create, edit, delete):
1) go to "configuration"
2) then "OG permissions overview"
3) select Node-group "edit"
4) permission list for all group-node types -- create, edit, delete
Checkout this support request issue too: Best way to keep content between authenticated users
These screen casts on OG helped me - http://modulesunraveled.com/organic-groups
Rose
Comment #3
doors commented@rosemeria Thanks for the reply.
I have already tried all of that but still once a user has the general permission to create a node type in this case "Product" they can add it to a group which it is set up to be added to in this case "Store" when the group is public.
I am using the "Domain Access" suite of modules as well and based on my research this is what might be causing the problem due to both OG and Domain Access using Node Access in different ways.
The following helped me out with getting private groups to only allow members to be able to post which was not possible before http://drupal.org/sandbox/kugta/1621090. Still though Public groups allow anyone to post no matter what the group permission is set to because the Commons Group module allows it and this message is shown at the top of the OG Node Permission page: "In addition to the permissions listed here, the Commons Groups module grants non-group members the ability to post content into groups where content in the group is public.". I want to know how to disable this feature that commons has implemented and I have tried to comment out the "commons_groups_og_user_access_alter" function contents in commons_groups.module file but it does not work.
Comment #4
dingo commentedIt seems like this functionality is provided by Organic Groups but it is being disabled by Drupal Commons.
Maybe someone from Acquia can shed some light.
Comment #5
davidseth commented@doors, you mentioned that you commented out "commons_groups_og_user_access_alter()" and it didn't work. Did you clear your site cache as well as rebuild permissions? I rebuilt permissions after I commented out the function and now I can make public groups and remove the ability of others from posting.
Cheers,
David
Comment #6
geigerg commentedSeems to be fixed per Organic Groups 7.x-2.2
Comment #7
WebSinPat commentedyes, i'm trying to accomplish the same thing, "I want a group and it's content to be public but not allow persons who are not members of the group to be able to add content."
I have the various privacy modules enabled, added the visibilty fields, configured my permissions, so i am able to click some boxes that say non members should not be able to post, but it seems to be disregarded by commons. as mentioned above.
Should I comment out the function mentioned in #5? I usually try to avoid modifying code, was hoping for a configuration button.
Comment #8
davidseth commented@WebSinPat, the only way to get it to work like you want is to comment out that function. It isn't ideal, but I am hoping that if I get some time I can commit a patch that would make this configurable.
Kind Regards,
David
Comment #9
doors commentedI too had to comment out the function to get it working. The thing is though that if you had created content in a group before that (Even after clearing the cache and rebuilding the permissions) you can still post in that group even if you are not a member but it won't work for new groups or groups you have never posted in before.
Comment #10
ezra-g commentedI believe this will be addressed by #1961296: Refactor og_group_ref field per OG API improvements.
Comment #11
WebSinPat commentedIt does look like #1961296: Refactor og_group_ref field per OG API improvements would address my issue. It has been marked as fixed, and has a commit. Thanks for that.
I'm wondering should I apply the patches in the commit, or wait for an updated version of commons groups to be released? (I'm new to dealing with code still in development like this.)
Also, i'm unsure still how this fix would affect my site that has some existing groups i've already set up. Would I have to delete them and start new groups to get the functionality?
Comment #12
behoppe333 commentedLike WebSinPat, I am interested in this fix to Commons and new to the world of Drupal patches (or anything more complicated than using the recommended D7 release of a module). My situation may be simpler because I am building a new site (no old content). I look forward to preventing non-members from creating content and allowing members to post. Thanks everyone for comments on this topic.
Comment #13
ezra-g commentedAs mentioned in #10, this will be fixed in Commons 3.3 as part of #1961296: Refactor og_group_ref field per OG API improvements.
If you'd like to test this functionality before 3.3 is released, you can package Commons locally with the command:
drush make build-commons-dev.make.
Commons 3.3 is expected to be released in late June.
Comment #14
behoppe333 commentedThanks Ezra-g. That is great info. I wonder if you could provide a couple more things:
Many thanks
Comment #15
behoppe333 commentedFYI my webhost helpers got drush working for me. I have a running Commons Dev Release. :-)
It looks great and I can't wait for Commons 3.3 to go into production!
For those keeping score, drush finally worked per below (quoting Sr Tech Help):
The issue appears to stem from the fact that we have "fileinfo" disabled for the default PHP ( PHP 5.3 ) as a result of memory issues with fileinfo support compiled into that version. I've executed the drush command you provided using PHP 5.4 which is also available on your server and this resulted in successfully completing the command.
For your information I executed the command in the following manner:
drush make --php=/usr/local/php54/bin/php build-commons-dev.make
Comment #16
rgchi commentedI'm having a similar issue that I've posted to Drupal Answers. I'm seeking to create a private, moderated group.
Comment #17
ezra-g commentedThis was fixed as part of the 3.3 release.