You are here

function image_access in Image 5

Same name and namespace in other branches
  1. 5.2 image.module \image_access()
  2. 6 image.module \image_access()

Implementation of hook_access

1 call to image_access()
image_update in ./image.module
Implementation of hook_update

File

./image.module, line 58

Code

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