OREGON STATE UNIVERSITY

Restrict Content Per Node

Restricting content access by node is a narrow application of the Contact Access module.  What this means is that a permitted user designates a particular node to be editable and/or viewable by only a certain subset of people.

An example of when this might be used would be if a group wanted to create some type of non-categorized content that should only be viewed by a particular subset of people.

The roles that can configure this are limited to advanced authors and administrators, but once it is set, a tab appears on each node of the content type and an author, in addition to the other roles, is able to desginated whether the content should be restricted to authenticated and anonymous users.

In the following example, we'll restrict the Book page content type so that only certain node IDs are viewable/editable by authors, advanced authors, and administrators - please note, though, that this can be done on any content type of your choice:

  1. Go to Admin menu > Content management > Content type > Edit Book page > Access control.
  2. Once in the Access Content configuration panel, in the Per content node access control settings fieldset, check the Enable per content node access control settings checkbox.
  3. Click the Submit button.

role based access control settings with checked=

Once this setting is checked, it will provide an Access Control tab at the top of every node of this content type.

Within the Access Control tab, you may then select the roles you wish to have access or deselect the ones you wish to prevent access.  In the example below, we are restricting the viewing of the node for anonymous users.

access control tab for a single node

From this point on, any visitor who comes across this restricted Book page node and is not, at least, an authenticated user on this particular site, will see the following message:

access denied message to non-permitted user