I have a content type which contains files. I have a node with that content type which i want several, but not all people to be able to see it from a Drupal View. I know the list of the people i want to see the files, and am willing to input the names of users into any type of field of that node.

How do i filter a View to only show that node to that certain people listed in that field of users?

For context, the nodes contain some private documentation or architect design files, that not everyone should see, but also should be seen by several people, not only administrator and owner of the node.


It depends on what kind of view you're creating. You are probably working on a view for content. So the filters are limited to those related to content. You can add a relationship "Content: Author" (Relate content to the user who created it.) under "Advanced Options" to add more filter criteria to the filter criteria list (User will show up in the filter list then, too).

enter image description here

Or you try creating a view for users.

  • use the Views module to create the list – actually a list of users (rather than nodes/content).
  • use relationships settings to add in the interests, and finally
  • add a contextual filter on "user: uid" with a default value fetched from the currently logged-in user.

You could just add your requisite users to a role / group and then assign access to that role via the access panel in your view.

  • 1
    In future, there might be a tons of these groups, so that's definitely not what i want.
    – Riki137
    Nov 28 '14 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.