Skip to content
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

Unauthorised community/collection logo fix #2689

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Atmire-Kristof
Copy link
Contributor

References

Fixes #2688

Description

Fixes comcol-page-logo component to create a proper download link for the logo, attaching an authentication token to the url, akin to how thumbnail component handles bitstream urls.
This fixes proper view access to the community/collection logo on their pages.

Instructions for Reviewers

How to test:

  • Create a community/collection with a logo
  • Remove resource policies from the logo's bitstream (or restrict it to administrators)
  • Visit the community/collection's page. The logo should be visible when logged in as administrator.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • 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.

@tdonohue tdonohue added authorization related to authorization, permissions or groups 1 APPROVAL pull request only requires a single approval to merge component: Community Community display or editing component: Collection Collection display or editing port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release labels Dec 5, 2023
@Atmire-Kristof
Copy link
Contributor Author

My changes were trying to authorise the image the moment the component gets loaded, which caused anonymous users to always see the placeholder, even when they have access. I've fixed this to be more in-line with thumbnail component where it'll only try to authorise the image if the request for its content first fails.

Copy link

Hi @Atmire-Kristof,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@tdonohue
Copy link
Member

tdonohue commented May 3, 2024

@Atmire-Kristof : This has code conflicts. If you wish to have it still considered for 8.0, please get this PR cleaned up and updated to latest main. Otherwise, we'll have to reschedule for 9.0. Thanks!

@kanasznagyzoltan
Copy link

I tried to test but I do not know how to make a collection or community logo to be restricted.
Could anybody help me how to do that?
Thank you!

@kanasznagyzoltan
Copy link

@Atmire-Kristof
I would like to test this PR, but I do not know how to make a collection or community logo to be restricted.
Could you help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge authorization related to authorization, permissions or groups component: Collection Collection display or editing component: Community Community display or editing merge conflict port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release
Projects
Status: 👀 Under Review
Development

Successfully merging this pull request may close these issues.

Restricted Community/Collection logo not visible by Administrator
3 participants