function node_gallery_image_user_access in Node Gallery 6.2
Same name and namespace in other branches
- 6 node_gallery.module \node_gallery_image_user_access()
File
- ./
node_gallery.module, line 596 - 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;
}
}