I want to make a content access ( node ) based on it's user reference field .
ie: While i'm creating a node that have a user reference field, i want that it will be accessible just for the users that i mentionned before .
Is there any module or a way to do that ?
Thank you very much


For Drupal 7 there's the Node Access User Reference module which does exactly what you are asking for.


There are plenty of node access modules available for Drupal but I honestly am not sure if there is one that would do exactly what you are looking for.

Either way, I would probably avoid a specific node access module for this and use Panels - read the Panels module - to do this since its makes this scenario easy to accomplish.

You can easily override Drupal's standard Node template and create an invariant that matches both the content/node type you want to apply this rule on and add a condition that the logged in user's ID matches the user id in the reference field defined by the node.

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.