You are here

function page_access in Drupal 4

Implementation of hook_access().

File

modules/page.module, line 53
Enables the creation of pages that can be added to the navigation system.

Code

function page_access($op, $node) {
  global $user;
  if ($op == 'create') {
    return user_access('create pages');
  }
  if ($op == 'update' || $op == 'delete') {
    if (user_access('edit own pages') && $user->uid == $node->uid) {
      return TRUE;
    }
  }
}