Skip to content

[Port dspace-8_x] Show restricted thumbnails to users with access rights #4251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dspace-8_x
Choose a base branch
from

Conversation

artlowel
Copy link
Member

References

Description

There was already a call to get a shortlivedtoken in the thumbnail component. The issue was that in prod mode, angular didn't detect that the image src had changed afterwards so it didn't rerender the image.

The solution was to use a BehaviorSubject for the src and the isLoading boolean

Instructions for Reviewers

  • Create a bitstream in the ORIGINAL bundle of an item
  • Configure an embargo for that bitstream, with a date in the future
  • Run filter-media -f -i ${the item's handle} on the item containing the bitstream
  • Go to the item page as an admin, and verify that you can see that bitstream's thumbnail
  • Go to the item page as an anonymous user, and verify that you see a placeholder instead

Checklist

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@artlowel artlowel added bug authorization related to authorization, permissions or groups testathon Reported by a tester during Community Testathon labels Apr 25, 2025
@artlowel artlowel moved this to 🙋 Needs Reviewers Assigned in DSpace 8.x and 7.6.x Maintenance Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authorization related to authorization, permissions or groups bug testathon Reported by a tester during Community Testathon
Projects
Status: 🙋 Needs Reviewers Assigned
Development

Successfully merging this pull request may close these issues.

2 participants