You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grant permission to a user to one or more restricted file.
User logs in and navigates to the dataset
User sees Preview 'eye' icon in the Files list for the restricted file they have access to
User clicks the 'eye'
the file.xhtml page is rendered for the user
there is no Preview tab
When does this issue occur?
Only for restricted files
Which page(s) does it occurs on?
In every dataset page when a Previewer is enabled.
What happens?
See above ^^^
It happens because FilePage.java calls FileUtil.isPreviewAllowed() which returns false if the file is restricted (and does not check if the user actually has access). FilePage should call FileDownloadHelper isPreviewAllowed() as that is the method called by all other classes/objects and allows the eye icon to show in the files list in the first place.
To whom does it occur (all users, curators, superusers)?
Anyone who has access through a role.
What did you expect to happen?
The preview tab in the file.xhtml should show.
Which version of Dataverse are you using?
This will occur for every version of dataverse since the file previewers were created. I tested it on demo.dataverse.org v5.8
Any related open or closed issues to this bug report?
Note that I only tested it with SpreadsheetPreviewer but given the restricted file condition returning false in the FileUtil.isPreviewAllowed() method, I expect the issue is across all previewers.
What steps does it take to reproduce the issue?
When does this issue occur?
Only for restricted files
Which page(s) does it occurs on?
In every dataset page when a Previewer is enabled.
What happens?
See above ^^^
It happens because FilePage.java calls FileUtil.isPreviewAllowed() which returns false if the file is restricted (and does not check if the user actually has access). FilePage should call FileDownloadHelper isPreviewAllowed() as that is the method called by all other classes/objects and allows the eye icon to show in the files list in the first place.
To whom does it occur (all users, curators, superusers)?
Anyone who has access through a role.
What did you expect to happen?
The preview tab in the file.xhtml should show.
Which version of Dataverse are you using?
This will occur for every version of dataverse since the file previewers were created. I tested it on demo.dataverse.org v5.8
Any related open or closed issues to this bug report?
Screenshots:
See the Dataverse Users Community conversation with Phil: https://groups.google.com/g/dataverse-community/c/kjhzKAuncSs
for screenshots
The text was updated successfully, but these errors were encountered: