You are here

function photos_access in Album Photos 6.2

1 string reference to 'photos_access'
photos_admin_settings in inc/photos.admin.inc

File

./photos.module, line 347

Code

function photos_access($op, $node, $account) {
  switch ($op) {
    case 'create':
      return user_access('create photo', $account);
    case 'update':
      return user_access('edit any photo', $account) || user_access('edit own photo', $account) && $account->uid == $node->uid ? true : NULL;
      break;
    case 'delete':
      return user_access('delete any photo', $account) || user_access('delete own photo', $account) && $account->uid == $node->uid ? true : NULL;
  }
}