I've racked my brain and tried a combination of permissions using both the global permissions within OG as well as other content access modules. What I need is a permission within OG to "view own" content. There are permissions for "edit own" and "delete own" and I've even added on the OG Create Permissions module but I don't see a way to "view own" nodes within a content type.

Use case:
I have content types within a group that I only want the author of the nodes to be able to see unless they reference another user giving them access. When the author is no longer a member of the group I would like all of those permissions stripped (view, edit, delete). This works for edit & delete but not for viewing.

Am I missing something?

Comments

Sylense’s picture

Oh and as it currently stands when I create a node within a group (using OG create permissions and the gid) everyone within that particular group can see the nodes. That is where the "View Own" permission needs to take effect.

Edit: If I use another module such as Content Access I can set nodes within a content type to a "View Own" permission but the problem is if the user leaves the group, they still have access to the nodes based on that setting.

Katharine_Gates’s picture

Yes I'm looking for this too... have you figured it out?

NWOM’s picture

I'm currently looking for a solution like this too. I'll post as soon as I find something.

chrowe’s picture

Also searching for something. Was hoping that https://drupal.org/project/node_view_permissions might work but no luck yet.

gettysburger’s picture

I decided to go with the Content Access module. I had to set the weight of the CA permissions to 10 to get it to work, but it seems to fit the bill.

gettysburger’s picture

Wow, I might reconsider. Node View Permissions looks very light weight. Thanks for showing this to me.

schifazl’s picture

Issue summary: View changes

Bumping this up. I don't understand how to add "view own" and "view any" for a content type in OG.

Example: I have one OG for each class, each student will have some marks for each subject. I want that the mark can be seen by the referenced user, by the teacher who created it and by the class president, who supervises the student's progress

gettysburger’s picture

I needed a similar use case as you have for the students being able to only see their own. I created a view block that used a contextual filter on the logged in user. The view was only visible by a person with the role "student" and it was only visible on the content type of the group. Then, when the student visited the group, the block would appear and show only their content.

In your case, the contextual filter for the student would be the referenced user field and the teacher would see a different view block with a set up like mine, with the contextual filter on the logged in user.

For the class president, you may try making her an administrator user of the group, which would giver her permission to see any content.

rhankins’s picture

So I think I've set things up as gettysburger described, which allows users to only see their group's content from the view. However, if they use the site search or just simply know the URL to content that belongs to other groups then they can view that content. How can I restrict it so that users in a group can only view the content that is connected with their group? Am I missing something here?

rhankins’s picture

Okay, I figured out what the issue was for me. I needed to follow these instructions to set the content visibility to private to the group:

https://www.drupal.org/node/2014987