Only show result when the author has a relation with the current user You might already suspected it, I'm talking about groups. I've a content type what represents groups, the node/group is referred in a field (field_group) on the user entity. With this relation I want to define "permissions" in views.

For example the blog I build now displays content of all groups, no matter what group you are in, the view will always display all blog nodes. Now I want only to display the nodes what have an author with a field_group value equal to the currently logged in user its field_group value.

How should I do this in views? Some people mentioned to use contextual filters, I tried some common options but it didn't resulted like expected...

Please, let me know if you know a working setup.

Thanks ~ F.
Found out how it should be done if you can refer to an author.

My setup:


add relation ship Content : Author as "author"
add relation ship User: Group (field_group) - Appears in: user:user. with the relation to "author".
add contextual filter User: Group (field_group) - Appears in: user:user. with at "When the filter value is NOT available" -> "Provide default value" -> "PHP Code" the following code:
global $user;
$data = user_load($user-&gt;uid, TRUE);
return $data-&gt;field_group['und'][0]['nid'];