You are here

function media_gallery_remove_item_access in Media Gallery 7

Same name and namespace in other branches
  1. 7.2 media_gallery.module \media_gallery_remove_item_access()

Access callback for removing a media item from a gallery.

Parameters

$node: The gallery node object.

$file: The file to remove from the gallery.

Return value

TRUE if access is granted; FALSE otherwise.

1 string reference to 'media_gallery_remove_item_access'
media_gallery_menu in ./media_gallery.module
Implements hook_menu().

File

./media_gallery.module, line 1531

Code

function media_gallery_remove_item_access($node, $file) {

  // Only grant access if the user can edit the gallery and the provided media
  // item is attached to the gallery.
  return media_gallery_edit_access($node) && in_array($file->fid, media_gallery_get_file_ids($node));
}