1. drupal
    1. 4.7
    2. 5
    3. 6
Versions
4.7 – 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 restrict access to actions the module performs.

Return value

An array of permissions strings.

Permissions are checked using user_access().

For a detailed usage example, see page_example.module.

Related topics

Code

developer/hooks/core.php, line 765

<?php
function hook_perm() {
  return array('administer my module');
}
?>