function node_gallery_image_user_access in Node Gallery 6
Same name and namespace in other branches
- 6.2 node_gallery.module \node_gallery_image_user_access()
1 call to node_gallery_image_user_access()
File
- ./
node_gallery.module, line 346 - Node gallery module file.
Code
function node_gallery_image_user_access($op, $image = NULL) {
global $user;
switch ($op) {
case 'edit':
if ($user->uid == $image->uid) {
return user_access("edit own {$image->type} content") || user_access("edit any {$image->type} content");
}
if ($user->uid != $image->uid) {
return user_access("edit any {$image->type} content");
}
break;
}
}