You are here

function homebox_perm in Homebox 6

Same name and namespace in other branches
  1. 6.3 homebox.module \homebox_perm()
  2. 6.2 homebox.module \homebox_perm()

Implementation of hook_perm().

File

./homebox.module, line 125
Home box main file, takes care of global functions settings constants, etc.

Code

function homebox_perm() {
  $permissions = array(
    'administer homebox',
  );
  if ($pages = homebox_pages()) {
    foreach ($pages as $page) {
      $permissions[] = "access homebox " . $page->safe_name;
    }
    return $permissions;
  }
  return NULL;
}