You are here

function private_perm in Private 6

Same name and namespace in other branches
  1. 5 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 54
A tremendously simple access control module -- it allows users to mark individual nodes as private; users with 'access private content' perms can read these nodes, while others cannot.

Code

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