Definition

blog_access($op, $node, $account)
drupal/modules/blog/blog.module, line 31

Description

Implementation of hook_access().

Code

function blog_access($op, $node, $account) {
  switch ($op) {
    case 'create':
      // Anonymous users cannot post even if they have the permission.
      return user_access('create blog content', $account) && $account->uid;
    case 'update':
      return user_access('edit any blog content', $account) || (user_access('edit own blog content', $account) && ($node->uid == $account->uid));
    case 'delete':
      return user_access('delete any blog content', $account) || (user_access('delete own blog content', $account) && ($node->uid == $account->uid));
  }
}