You are here

function forum_access in Drupal 4

Same name and namespace in other branches
  1. 5 modules/forum/forum.module \forum_access()
  2. 6 modules/forum/forum.module \forum_access()

Implementation of hook_access().

File

modules/forum.module, line 115
Enable threaded discussions about general topics.

Code

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