The node privacy by role module allows users, when creating or editing a post, to select which roles of users on a site will have view, edit, or delete permissions for the node. Community leaders frequently want to give permissions to roles to create and manage content for a site. The ability to publish information, that would traditionally be hoarded, allows communities to educate each other while still preserving the value of knowledge.

The node privacy by-role permissions are set by users for their nodes. If the node privacy by role module is disabled, the default permissions scheme will be in effect again, in which all users have view permissions for all nodes. However, if the module is re-enabled, the node-by-node permissions that were in place during the previous period in which the module was enabled will take effect again. Using the Uninstall option will make the permission reversal permanent.

Roles given edit permissions are automatically given view permissions even if the user tries to give edit permissions to a particular role, but not view permissions.

Before Drupal 4.7, you must explicitly enable or disable the module at administer >> settings >> node_privacy_byrole.

You can:

  1. set default permissions for each content type in the default settings at administer >> content >> configure >> content types for each content type.
  2. decide who can ignore the default permissions for each content type in the default workflow settings at administer >> content >> configure >> content types for each content type.
  3. file issues, read about known bugs, and download the latest version on the Node privacy byrole project page.

Comments

amanda’s picture

I just went through double checking a thing I've never quite grasped, so I thought I'd share. Basically, the module, node_privacy_by_role can only extend privileges to users who already have permission to "access content"

For instance, if your roles include:
group0, group1, group2, group3

The site's current set up was such that permission to:

access content was granted to roles: group0, group1, group2
access node/45: group0, group2, group3

Then users who are only in group3 (lacks "access content") and users who are only in group1 (denied in node_privacy_by_role) will both be locked out of viewing the node. Only users who have both "access content" permission set in the access control settings and who have been granted view privileges for that specific node will be able to see it.

jparets’s picture

Apart from the User Interface (which is a questions of preferences) the most important difference is that Content Access allows the optional activation of access control per node for each node type, i.e you can have types with control per node and types with only control per type. Node Privacy by Role, when installed, is mandatory for node types and nodes.

Control per node is very interesting but has a big drawback: if you change the access control privileges of a node type, nodes remain with the old privileges, i.e you have to edit each node and change the privileges.
From my point of view the use of access control per node SHOULD BE RESTRICTED to node types with few and controlled nodes, because it implies important problems in updating and migration.

This is my experience in migrating 5.x with CA to 6.x with NPR.
As conclusion, when you have different node types:
- If you need access control per node for ALL node types: Use Node Privacy By Role
- If you need acces control per node for FEW node types: Use Content Access