You are here

function casetracker_basic_case_access in Case Tracker 5

Same name and namespace in other branches
  1. 6 casetracker_basic.module \casetracker_basic_case_access()

Implementation of hook_access().

File

./casetracker_basic.module, line 142
Enables a basic project node type for use with Case Tracker.

Code

function casetracker_basic_case_access($op, $node) {
  global $user;
  switch ($op) {
    case 'create':
      return user_access('create cases');
      break;
    case 'update':
    case 'delete':
      if (user_access('edit own cases') && $user->uid == $node->uid) {
        return TRUE;
      }
      break;
  }
}