dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Restricted Bitstreams not supported in`ds-media-viewer`

Open ybnd opened this issue 1 year ago • 0 comments

Describe the bug ds-media-viewer was recently enabled on the demo server, but has some issues right now

  • Restricted thumbnails or image content are not shown. This was recently addressed for ds-thumbnail in #1694. Since we're using ngx-gallery for this it's not immediately clear how to implement the same "retry with token" approach though. 20221006-105707

  • When used for regular thumbnails, images are centered in the left column 20221006-105626

The original code for these components is a bit messy, so I'd suggest we also refactor it as we address these issues

  • Nested subscriptions
  • Assumes every ORIGINAL Bitstream has a thumbnail
  • Assumes that Bitstreams in the ORIGINAL & THUMBNAIL Bundles are in the same order, which may not be the case → AFAIK the right way would be to match names?

To Reproduce Steps to reproduce the behavior:

  1. Run DSpace Anguar with mediaViewer.image: true
  2. Open an Item with a thumbnail
    • The thumbnail will be centered relative to the left column
  3. Find (or create) an Item with a thumbnail that only admin users can read
    • For admin users, the thumbnail will not show up on the Item page (but will show up on e.g. the search page)
    • For anonymous or non-admin users, the thumbnail will not show up

Expected behavior ds-media-viewer should work with restricted content and look similar to ds-thumbnail when used for thumbnails. When restricted content cannot be retrieved the placeholder should be shown.

Related work #1694

ybnd avatar Oct 06 '22 09:10 ybnd