Same name and namespace in other branches
  1. 4.7.x developer/examples/page_example.module \page_example_perm()
  2. 5.x developer/examples/page_example.module \page_example_perm()

Implementation of hook_perm().

Since the access to our new custom pages will be granted based on special permissions, we need to define what those permissions are here. This ensures that they are available to enable on the user role administration pages.

File

developer/examples/page_example.module, line 37
This is an example outlining how a module can be used to display a custom page at a given URL.

Code

function page_example_perm() {
  return array(
    'access foo',
    'access baz',
  );
}