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

Fix/273 deaccessioned dataset unauthenticated #367

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

ekraffmiller
Copy link
Contributor

@ekraffmiller ekraffmiller commented Apr 11, 2024

What this PR does / why we need it:

This PR fixes an issue where the Dataset page of a deaccessioned dataset is not viewable for unauthenticated users.

To recreate this error, create dataset, publish it, then deaccession it. In JSF, when you log out, the deaccessioned dataset is still viewable to the unauthenticated user. If you go to the SPA and try to view the dataset, you get 'Page Not Found'

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

Follow the steps to reproduce above. Test that the Dataset page is still viewable when the user is logged out.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

@coveralls
Copy link

Coverage Status

coverage: 97.416% (-0.04%) from 97.459%
when pulling a5eec33 on fix/273-deaccessioned-dataset-unauthenticated
into c0f2d0b on develop.

@ekraffmiller ekraffmiller marked this pull request as ready for review April 11, 2024 13:29
@ekraffmiller ekraffmiller added pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows labels Apr 11, 2024
@g-saracca g-saracca self-assigned this Apr 11, 2024
Copy link
Contributor

@g-saracca g-saracca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix, looks great to me. I have already tested the behavior in the JSF version and tested the behavior in this branch and everything works as expected.

The error was occurring because Promise.all failed due to the api call to downloadSizes when canEditDataset was false right?
Attached is a screenshot of how a non-authenticated user can view a deaccesioned dataset.

Screenshot 2024-04-11 at 11 15 57

@ekraffmiller
Copy link
Contributor Author

Nice fix, looks great to me. I have already tested the behavior in the JSF version and tested the behavior in this branch and everything works as expected.

The error was occurring because Promise.all failed due to the api call to downloadSizes when canEditDataset was false right? Attached is a screenshot of how a non-authenticated user can view a deaccesioned dataset.

Yes, that's right, the unauthenticated user doesn't have permission to get the downloadSizes

@g-saracca g-saracca removed their assignment Apr 11, 2024
@MellyGray MellyGray self-assigned this Apr 15, 2024
Copy link
Contributor

@MellyGray MellyGray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Deaccessioned page it's working well with an unauthenticated user

@MellyGray MellyGray merged commit 4f51429 into develop Apr 15, 2024
12 of 14 checks passed
@MellyGray MellyGray deleted the fix/273-deaccessioned-dataset-unauthenticated branch April 15, 2024 09:51
jayanthkomarraju pushed a commit to jayanthkomarraju/dataverse-frontend that referenced this pull request May 31, 2024
…nauthenticated

Fix/273 deaccessioned dataset unauthenticated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FIx dataset loading logic for Deaccessioned Dataset
4 participants