0

I want to set up restricted access of a particular node or some nodes. I have read the article http://wearepropeople.com/blog/drupal-set-up-restricted-access-for-certain-nodes and tried to implement the same through the Page Manager module located within Ctools on my website; however, I failed to do so.

I know I can restrict any node/page using custom coding but I want to implement this using drupal's default feature. Kindly help me in this regard.

Fred
  • 3,324
  • 1
  • 19
  • 29

2 Answers2

0

If you want to grant/deny access based on a user's role you could try out node access

https://www.drupal.org/project/nodeaccess

Thor
  • 74
  • 1
  • 6
0

You can make your own hook_node_access() function:

https://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook_node_access/7

Check for node id, and depending on that (or what ever condition you want) allow or deny access to that node.

But be careful - this hook is called for all nodes on the site!

MilanG
  • 6,994
  • 2
  • 35
  • 64