hook_perm
- Versions
- 4.6 – 6
hook_perm()
Define user permissions.
This hook can supply permissions that the module defines, so that they can be selected on the user permissions page and used to grant or restrict access to actions the module performs.
Permissions are checked using user_access().
For a detailed usage example, see page_example.module.
Return value
An array of permission strings. The strings must not be wrapped with the t() function, since the string extractor takes care of extracting permission names defined in the perm hook for translation.
Related topics
Code
developer/hooks/core.php, line 1491
<?php
function hook_perm() {
return array('administer my module');
}
?>Login or register to post comments 
hook_permission() in Drupal 7
For the Drupal 7 version of this hook see http://api.drupal.org/api/function/hook_permission/7