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

Auxiliary file download #7729

Merged
merged 49 commits into from Apr 22, 2021
Merged

Auxiliary file download #7729

merged 49 commits into from Apr 22, 2021

Conversation

pdurbin
Copy link
Member

@pdurbin pdurbin commented Mar 26, 2021

What this PR does / why we need it:

Adds the ability to download auxiliary files from the web interface. Also, other cleanup was done.

Which issue(s) this PR closes:

Closes #7400

Special notes for your reviewer:

I talked to @djbrooke about trimming down the changes he made but ultimately didn't because I wasn't sure what to take out or how to best word things. I think it's fine to leave it all in but I'm also fine with some of it being removed.

Suggestions on how to test this:

Use AuxiliaryFilesIT or your own methods to add some auxiliary files. Here are the changes to watch for (from the release note):

Auxiliary Files can now be downloaded from the web interface.

  • Aux files uploaded as type=DP appear under "Differentially Private Statistics" under file level download. The rest appear under "Other Auxiliary Files".

In addition, related changes were made, including the following:

  • New tooltip over the lock indicating if you have been granted access to a restricted file or not.
  • When downloading individual files, you will see "Restricted with Access Granted" or just "Restricted" (followed by "Users may not request access to files.") as appropriate.
  • When downloading individual files, instead of "Download" you should expect to see the file type such as "JPEG Image" or "Original File Format" if the type is unknown.
  • Downloaded aux files now have a file extension if it can be determined.

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

Yes. Mockups at https://docs.google.com/presentation/d/1XuX4qStdHjkFf4g1d1vKxxb85kuuUSEzdKN41dNM2mM/

Here's a screenshot showing the DP files:

Screen Shot 2021-03-26 at 2 16 23 PM

And another showing "other" files:

Screen Shot 2021-03-26 at 2 27 22 PM

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

Added.

Additional documentation:

Included.

@djbrooke
Copy link
Contributor

Thanks @pdurbin for the PR and for the note about the docs. I took another read through and I think they are fine for now, since we flag this as experimental.

@pdurbin
Copy link
Member Author

pdurbin commented Mar 29, 2021

  • If the tag for an aux file starts with "dp" it will be displayed under "Differentially Private Statistics" under file level download.

Over at opendp/dpcreator#135 (comment) @TaniaSchlatter asked if this could be changed to "dp_" (adding an underscore) and this got a thumbs up from @raprasad.

Yes, this is certainly possible. Let's see what other changes are requested and do them at once.

@scolapasta scolapasta moved this from Review 🦁 to IQSS Team - In Progress 💻 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Mar 30, 2021
@pdurbin
Copy link
Member Author

pdurbin commented Apr 6, 2021

Instead of "starts with dp" we decided to add a proper "type" parameter: d368a85

The downloaded files never had any file extensions. This was fixed in 5c67f95.

Ready for more review.

@pdurbin pdurbin moved this from IQSS Team - In Progress 💻 to Review 🦁 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Apr 15, 2021
@pdurbin pdurbin removed their assignment Apr 15, 2021
@pdurbin
Copy link
Member Author

pdurbin commented Apr 15, 2021

I made many commits to address the feedback above. In addition I just merged the latest from develop to pick up the change to 5.4.1 and renamed the SQL update script. Ready for more review.

Comment on lines 13 to 14
restrictedaccess=Restricted Access
restrictedWithAccessGranted=Restricted with Access Granted
Copy link
Contributor

Choose a reason for hiding this comment

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

I checked is only uses as a title on an image lock of a file search card; so let's have consistency and just have the one (restrictedaccess=Restricted with Access Granted)

Copy link
Member Author

@pdurbin pdurbin Apr 16, 2021

Choose a reason for hiding this comment

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

Done in d277aa1. Now the search card is consistent with other places:

Screen Shot 2021-04-16 at 11 17 07 AM

@NamedQuery(name = "AuxiliaryFile.findAuxiliaryFiles",
query = "select object(o) from AuxiliaryFile as o where o.dataFile.id = :dataFileId"),
@NamedQuery(name = "AuxiliaryFile.findAuxiliaryFilesByType",
query = "select object(o) from AuxiliaryFile as o where o.dataFile.id = :dataFileId and o.type like :type"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Just noticed this - why "like" and not straight "="

Copy link
Member Author

Choose a reason for hiding this comment

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

No reason. Fixed in e1d5541.

Comment on lines 1628 to 1629
file.downloadBtn.restricted=Restricted
file.downloadBtn.restricted.with.access.granted=Restricted with Access Granted
Copy link
Contributor

Choose a reason for hiding this comment

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

We can now get rid of these and just use:
restricted=Restricted
restrictedaccess=Restricted with Access Granted

Copy link
Contributor

@scolapasta scolapasta left a comment

Choose a reason for hiding this comment

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

With the exception of deciding on the API (which we documented as a todo and also explicitly mentioned in the "experimental" section, I think this is good to go. Next up, QA!

@kcondon kcondon merged commit ffc105d into develop Apr 22, 2021
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from QA 🔎✅ to Done 🚀 Apr 22, 2021
@kcondon kcondon deleted the 7400-opendp-download branch April 22, 2021 18:28
@djbrooke djbrooke added this to the 5.5 milestone Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Auxiliary Files - Accessing DP releases in Dataverse
5 participants