You are here

function basicevent_access in Event 5

Implementation of hook_access().

File

contrib/basicevent.module, line 31
An extremly simple module to implement the event API.

Code

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