2

I have a content type that contains information about meetings. One field of this content type is 'members', which is of type Entity reference (a field type provided by the Entity Reference module). It specifies the included users in the meeting (using a multiple select list).

I want the content to be accessible only by these specified users.

Is it right to use the Node access user reference module for this purpose? If so how?

  • Because it does what you're asking for... – user1527576 Aug 21 '15 at 2:30
3

Use the Node access user reference module. Since you're already using Entity reference, it should fit. Some more details about this module (from its project 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.

You should configure the module similar to the settings shown in the screenshot on its project page, which is like so:

enter image description here

Though I would uncheck the Grant for all users option (= view).

That way the users who can create such meetings (nodes) have all permissions they need (since they'll be the author). And the "specified users" will be able to view it, which appears to be exactly what you want.

To actually configure these settings, refer to the module's README.txt, which includes these instructions:

Create a field to reference users in a content type using the Field UI. The field's configuration page will contain the settings for Node access user reference. For detailed instructions on using the Field UI see: https://www.drupal.org/documentation/modules/field-ui

| improve this answer | |

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.