Now that you understand the basics of Drupal's user access system, we can explore how modules can extend that system. First, a little history lesson.
Until Drupal 7,
hook_permission() was known as
hook_perm(). The change was made for clarity in the code, as part of a general semantic cleanup of Drupal core. (I wrote the patch, in fact.)
hook_permission() also includes a number of usability improvements, which altered the format of the function's return value. These changes are substantial enough for even experienced Drupal developers to explore each element of the new hook.
The purpose of
hook_permission() is to define and return an array that contains all the necessary information about your module's permissions. This includes ...