Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This PR displays previewers that require auxiliary file(s) that are public even in cases where the user cannot download the datafile itself (i.e. it's restricted).
Dataverse allows upload of "auxiliary files" that are associated with a datafile, and it allows making auxiliary files public when the datafile itself is restricted/embargoed/beyond it's retention period. We also allow previewers and externalTools in general to 'require' auxiliary files and to display their content. However, the code cannot currently recognize that, when an auxiliary file is public, a tool requiring it can probably be used when the user does not have the ability to download the restricted datafile itself.
QDR has developed a sensitive data example with the QDAS previewers where this is relevant. QDAS codebooks can contain some entries that are more sensitive than others. The QDAS tools from Dataverse now have the ability to create 'redacted' versions of the codebook that remove such entries and to write the redacted version as a public auxiliary file. The intent is to allow people who do not have access to the full file to see only the less sensitive content.
This PR refactors the previewer code to allow this use case. It changes the overall logic of identifying which tools to display for a given datafile by making/caching the list of tools a given user is allowed to use, including tools that require a auxiliary file that exists and is public even if the user cannot access the file. (The original code made/cached a list of all the tools available for a given file and then checked the user's permission to access the file dynamically/multiple times.)
This is being created as a draft PR for a few reasons:
Which issue(s) this PR closes:
Special notes for your reviewer:
Suggestions on how to test this:
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: