function photos_node_access in Album Photos 7.3
Same name and namespace in other branches
- 8.5 photos.module \photos_node_access()
- 8.4 photos.module \photos_node_access()
- 6.0.x photos.module \photos_node_access()
Implements hook_node_access().
File
- ./
photos.module, line 525 - Implementation of photos.module.
Code
function photos_node_access($node, $op, $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;
}
}