You are here

function video_access in Video 5

Same name and namespace in other branches
  1. 6 video.module \video_access()
  2. 6.2 video.module \video_access()

access hook

File

./video.module, line 440
Display video in Quicktime MOV, Realmedia RM, Flash FLV & SWF, or Windows Media WMV formats.

Code

function video_access($op, $node) {
  global $user;
  if ($op == 'create') {
    return user_access('create video');
  }
  if ($op == 'update' || $op == 'delete') {
    return user_access('edit own video') && $user->uid == $node->uid || user_access('edit all video nodes');
  }
}