You are here

function private_perm in Private 5

Same name and namespace in other branches
  1. 6 private.module \private_perm()

Implementation of hook_perm().

In this example, we will use a simple permission to determine whether a user has access to "private" content. This permission is defined here.

File

./private.module, line 67
This is an example illustrating how to restrict access to nodes based on some criterion associated with the user.

Code

function private_perm() {
  return array(
    'mark content as private',
    'access private content',
    'edit private content',
  );
}