You are here

function geshinode_access in GeSHi Filter for syntax highlighting 5.2

Same name and namespace in other branches
  1. 6 geshinode.module \geshinode_access()

Implementation of hook_access().

File

./geshinode.module, line 53

Code

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