Let's say I have a Content Type of fruit. I want to control access to individual nodes of type fruit by an entity reference on a user record. What is the best way to do that?

In other words, if a user record has an entity reference field which references the nodes titled "orange" and "banana", he should only have access to those two nodes of the Content Type fruit.

[Someone below suggests Node Access User Reference, but that doesn't actually apply to this situation].

1 Answer 1


The Node Access User Reference module is probably what you want. From the module page:

Gives content access permissions to users for content that references the users with User reference or Entity reference.

This is great if you want your content authors to be able to choose additional authors, or choose who can view their content, as well as being able to display the list of authors or viewers within your content, or in views displays.

  • I saw that, but I think it is for the situation where the node contains a reference to the user, rather than the other way round - the User profile containing an Entity reference to the node.
    – James
    Commented Dec 14, 2015 at 11:31
  • You're right. I was a little hasty! You could probably adapt this module if you feel like a coding challenge :) Commented Dec 14, 2015 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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