| 5 node_example.module | node_example_perm() |
| 6 node_example.module | 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.
File
- developer/
examples/ node_example.module, line 88 - This is an example outlining how a module can be used to define a new node type.
Code
function node_example_perm() {
return array('create example node', 'edit own example nodes');
}
Login or register to post comments