I am using creating a new content type related to a group.
Some of these content types need to be restrict so only admin can create new content.
However, seems like everything I do can't prevent authenticate user from adding new content of this content type.

- In group permissions it's set correctly.
- In main permission it's set correctly.
I have tried disable/enable 'Strict node access permissions'.
I have tried to find something in the commons_post feature that has something to with it, but it happened also in the build-in content types [wiki, post and so.].

I have also checked fresh install and this problem still occurs.
I guess it has to concern many because it's a necessary request to have content type that only admin can add.

Comments

ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)

- In group permissions it's set correctly.
- In main permission it's set correctly.

Can you elaborate on how you have group permissions configured? If groups are private, then non-group members shouldn't be able to post into them.

amirtaiar’s picture

Groups set to private, but this is not the issue.
To be more clear, lets say this are 2 of my content types + there permission (what I want):
1. post - Authenticate.
2. Payments - Admin.

What happens is that authenticate users can add payments as well even though they don't have permissions to do so...

blacklabel_tom’s picture

Hi,

Can you describe what it is you are trying to do please?

If you are trying to restrict the creation of content to a particular role (Admin for example) you can change the 'create', 'edit' & 'delete' permissions per role at '/admin/people/permissions' under the 'Node' heading.

Cheers

Tom

amirtaiar’s picture

I am updating an issue as far as I can see.
I have content type that I give only the admin permission to create/edit/delete.
The authenticate have permission to view - sure.

But, the autenticate group member is able to create/edit/delete node from this content type.

blacklabel_tom’s picture

Which content type is it you have set the permissions for?

Topcheese’s picture

I've yet to play with this functionality, but this is a duplicate and you will find more info here Post dont shows up in the group page when adding file to node

amirtaiar’s picture

Topcheese, It has no relation with this post that I have added.
I really straggling here to make myself clear and I am sorry if I am not, but it seems very understood to me.

1. I have created new content type ['payment'] - It's set as group content.
2. I gave this content type this permission [Both on og permission and on admin/people/permissions]:
-- admin - create/edit/delete
-- authenticate - view only!
3. I have used [and modify[ the http://drupal.org/project/commons_posts module to have a tab and a 'add content' on the commons_bw widget.

Now when I enter the group as a member [authenticate user] I can create/edit/delete 'payment' in the group.

Thank you all for helping and I hope I can find the solution.

Topcheese’s picture

@amirtaiar, sorry about that, and no problem. I guess I didn't understand this issue either, but that's what came to mind. I'm not sure I can help, but I'm trying to understand the issue. Thanks for the information.

blacklabel_tom’s picture

Is there any chance you could post up screenshots of your permission and OG permissions screen where the permissions for 'payment' can be seen please?

amirtaiar’s picture

StatusFileSize
new45.88 KB
new52.86 KB
new51.66 KB

I have attached 3 screenshots:
1. OG permissions - The 4 upper content type are for 'payment' the 4 bottom are for "post'.
2. Global permissions - Same here for the upper once and the bottom.
3. Add content widget as seen as authenticate user.

Must say I have already used OG on 6 websites but not with commons...

amirtaiar’s picture

StatusFileSize
new40.06 KB

So finally I have disable the "Strict node access permissions" at admin/config/group/settings which works for me now,
Still the problem is that in the widget this -un-access content types apear for authenticate-group-member user.
See image,

So I need this content types to not apear in the widget.

summit’s picture

Hi @amirtaiar can you set your screens in english please?
And did you succeed in making the right content restrictions. I have a sort of the same use case.
I want group content not to be published and shown outside the group-members. Is this what you achieved?

Greetings, Martijn

ceepeebee’s picture

I guess, I ran into a similar problem. (DC 7.x-7.4)
When testing this with a fresh install, I couldn't reproduce the erroneous behaviour I witnessed (cross private-group content creation without being a member of the other (private!) group when having permission to do so in the own group), but I can confirm problems when restricting permissions in private groups.

If you turn on organic groups access control and remove _all_ permissions for authenticated users resp. normal group members to create/edit (group) content
a) via admin/people/permissions
b) via admin/config/group/permissions/node/group and
c) via group/node/1/admin/permissions
and set the group's privacy settings to: joining requires an invitation

then commons_bw doesn't allow content creation as expected
but a group-member can go to node/add/post (or any other group-content-type) and create new content even though he does not have the permissions to do so.

For clarification: in a public group permission-restriction for members won't work at all, because even non-members can create content in a public group as stated above the group permission settings.

ceepeebee’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active

Maybe my previous post gives the information needed...

peezy’s picture

Title: Authenticate user can add any 'group content' » Group Member can add any 'group content'
Version: 7.x-3.0-beta1 » 7.x-3.4
Component: Miscellaneous » Groups

I'm having a similar issue, so I thought I would provide more details with the hope that I can help get this resolved. I have a Drupal Commons 3.4 site with numerous private groups. These groups have several content types that are considered group content. The relevant content-type for this issue is the blog_entry content type. Only Admin Members should be able to create blog entries; regular group Members should not.

The issue appears to be that once a user's membership is approved for a private group, they are able to create any group content regardless of the permissions.

Here are my settings / permissions:

  1. OG Access Control is enabled and permissions have been rebuilt
  2. At /admin/people/permissions the Create Blog Entry content permission is unchecked for all roles
  3. At /admin/config/group/permissions/node/group the Create Blog Entry content permission is unchecked for Members, but checked for Admin Members
  4. Also of note at /admin/config/group/permissions/node/group is that the only Create content permission I have checked for Members is for Forum Posts
  5. At /group/node/[nid]/admin/permissions the Create Blog Entry content permission is unchecked for Members, but checked for Admin Members
  6. At /node/[nid]/edit "Joining requires an invitation" is selected

Given the above I would expect that Members would get an Access Denied error at /node/add/blog-entry; however, the Blog Entry node form appears which they can complete. In addition, when I visit node/add/ I see that every group-related content-type is listed, regardless of the permissions for the content-type.

If there is another Create Blog Entry permission or another setting that I'm missing please let me know.

japerry’s picture

Version: 7.x-3.4 » 7.x-3.x-dev
Category: Support request » Feature request

Changing this to be a feature request. Currently in commons we set permissions automatically based upon the group visibility options. This unfortunately makes it impossible to set group admins as the only ones able to post content.

I think it'd be a good feature, but would require a bit of re-writing to the permissions system. One possibility is to just set the permissions by default, but allow admins to manually change them later. Not sure what other implications that might bring though.

japerry’s picture

Issue summary: View changes
peezy’s picture

Thank you for your reply, @japerry.

I think it would be a great feature! It makes sense to me to separate content-creation and content-viewing permissions. Specifically, groups could inherit the create permissions from the OG permissions overview page at /admin/config/group/permissions/node/group by default and the view permissions from the privacy settings.

Working on this is beyond my programming skills; however, I'm happy to test any patches.

Thanks again! Everything else about Commons is working great for me and my client.