node_example_perm

  1. drupal
    1. 4.7 node_example.module
    2. 5 node_example.module
    3. 6
Versions
4.7 – 6 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.

Related topics

Code

examples/node_example/node_example.module, line 131

<?php
function node_example_perm() {
  return array(
    'create example content',
    'delete own example content',
    'delete any example content',
    'edit own example content',
    'edit any example content',
  );
}
?>