node_access_example_perm

  1. drupal
    1. 4.7
    2. 5
    3. 6 node_access_example.module
Versions
4.7 – 6 node_access_example_perm()

Implementation of hook_perm().

In this example, we will use a simple permission to determine whether a user has access to "private" content. This permission is defined here.

Code

developer/examples/node_access_example.module, line 43

<?php
function node_access_example_perm() {
  return array('access private content');
}
?>