node_example_perm

Versions
4.6 – 7
node_example_perm()

Implementation of hook_perm().

Since we are limiting the ability to create new nodes to certain users, we need to define what those permissions are here. We also define a permission to allow users to edit the nodes they created.

Code

developer/examples/node_example.module, line 80

<?php
function node_example_perm() {
  return array('create example node', 'edit own example nodes');
}
?>
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.