views:

45

answers:

2

Is there a Drupal module to specify access rules for specific nodes ?

I don't need to specify them for a generic content type, but for a specific node (nid).

Also I would like to specify permissions on a specific page (let's say a view).

thanks

A: 

Views has access control built in, you can set permissions for a view from inside the Views UI. When you edit a view there is a setting "Access" where you can set a role or permission that is required to access the view.

"Content Access" has an option for node-specific access, but I never used that part of the module myself (I previously wrote Module Grants, but that functionality came from Content Access).

Other options are Taxonomy Access or TAC lite that apply permissions based on taxonomy.

Fabian
I found this option, now I have a "Grant" tab on the node edit page. However I can only assign the grants to single users and not roles !?
Patrick
In other words. I only found these associations: content type -> role, node nid -> single user. What I need is node nid -> role.
Patrick
A: 

The Content Access module allows you to specify access control per node by role, breaking it down to a granular edit, view or delete permission by role.

Views allows a permission to be set by role under the 'access' option in basic settings. You can therefore set by display giving you quite rich control over what visitors have access to by role.

I've also used Nodeaccess which may be worth looking at. I believe this allows delegation of deciding which roles may edit, delete or update a node to the node author rather than the administrator.

CitrusTree
Content Access and NodeAccess allow you to specify permissions for "node type" and not for specific Nodes. I've tried them, but tell me if I'm wrong.
Patrick
Thanks for Access Rule in Views. It works.
Patrick
Check out "Per content node access control settings" on the Access Control Tab for each content type.
Fabian
That's right Fabien.Patrick, go to Content type -> [yourtype] -> Access control;Tick "enable per content node access control settings";You should then have another tab beside view and edit for nodes of that type - "Access control"
CitrusTree
ok, so now I have that tab for a specific product. However I cannot select authenticated users. I want to remove from anonymous and let only logged in users to see the page. CHeck the screenshot: http://dl.dropbox.com/u/72686/access.png
Patrick
The reason is imlpied on the project page: "it respects and makes use of drupal's built in permissions as far as possible". Your main permissions can affect these quite heavily. For example if you give a role the 'access content' permission only, they will be ticked (and can be unticked) for all view options. Try combinations of permissions at /admin/user/permissions in the node module section until you get the level of control you wisy by node.
CitrusTree
damn, for some reason I disabled Access Content in Permissions. I was sure it was enable. Thanks, solved
Patrick
No problem, glad you got it sorted.
CitrusTree

related questions