Daniel-KM / Omeka-S-module-IiifServer

IIIF Server is a module for Omeka S that adds the IIIF specifications to serve any images and medias.
Other
16 stars 11 forks source link

Non-visible or non public media are included in Manifest #11

Closed psalido closed 4 years ago

psalido commented 5 years ago

Non-visible or non public media are included in manifest for an item. I quick fix it including conditional on foreach $medias loop: (starting at line 213) foreach ($medias as $media) { if($media->isPublic()){ ... } .... Thumbnail generation is important, because can reveal hidden media. I fix changing query:

(original first line 1020)

` $qb = $conn->createQueryBuilder() ->select('media.id') ->from('media', 'media') ->leftJoin('media','resource','resource',

\Doctrine\ORM\Query\Expr\Join::WITH, ??

                    'media.id = resource.id'
              )
            ->where('item_id = :item_id')
            ->setParameter(':item_id', $resource->id())
            ->andWhere('has_thumbnails = 1')
            ->andWhere('resource.is_public = 1')
            ->orderBy('id', 'ASC')
            ->setMaxResults(1);

`

Daniel-KM commented 4 years ago

Hi, I just made a big update (version 3.6.0.beta-4). It requires last versions of modules Image Server, UniversalViewer or Mirador too. Can you say me if it is fixed?

Daniel-KM commented 4 years ago

Fixed in 3.6.0.beta-4.