Drupal 7 Rules - Grant access to node - pick username from node field I have in D7 Content access and Rules -modules. I have content type which Content access settings are limited to only admin.

In that content type I have User Reference field.

I need to have rule which picks username from that User Reference field and grants content view access to the user, so user can view that node.

So after rule has applied user from node User Reference field has view access to that content - ohter users can't see that node.

I have tryed multiple rules settings but have not got it right yet so help would be appreciated. Thanks!
Take a look at the Node access user reference module which is meant for this sort of thing (giving access permissions based on a user reference value in the content).


  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.