node_access_example_perm

Versions
4.6 – 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 55

<?php
function node_access_example_perm() {
  return array('access private content', 'edit private content');
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.