We should allow Data Owners to enable differentially private access for sensitive files that currently cannot be safely shared. This can be considered done even if the researcher cannot explore the differentially private metadata.
https://docs.google.com/presentation/d/1rPpaHNW-5QIskYvn_4afzXzU_wcdkZb2SjEDhpUhhLs/edit#slide=id.g26f2e4bd68_0_36
Reviewed the workflow slides with @TaniaSchlatter this morning and will be adding mockups to this issue upon finalization.
NOTE: Backend prerequisite, issue #4230
Here is an outline the proposed UI changes.
UI IMPACT
Dataset pg
File pg
NOTE: See issue #4234 for the rest of the workflow, which includes exploring the privacy preview in TwoRavens.
QUESTIONS
MOCKUPS



@matthew-a-dunlap please use branch 4230-4233-external-tool-psi. I will ping you if I want to re-merge my branch for #4230 into it.
@dlmurphy as we discussed I just merged 4233-PSI-data-owner into 4230-4233-external-tool-psi. I'll delete the former and when you are unblocked on the "TO BE ADDED" items, please use the latter.
Question about the modular dropdown:
Other questions:
@mheppler @TaniaSchlatter
Configure options will need to be not just for logged in users, but only if you have edit dataset permission. (As the result of the configure will call apis that edit)
@matthew-a-dunlap Gustavo should have covered your first two button questions. Yes and yes for your "other questions". I can stop by if you'd like to talk through the workflow in more detail.
This has taken longer than expected but is 90+% done. Here is the checklist: [removed and updated below]
Also, the Dataset configure dropdowns should use better logic to know if it has any entries, but this is not easily done with our hardcoding of map into the list, so I think it is best to defer it until geoconnect becomes a real modular option.
Discussed with Mike how the file page should have its own configure dropdown instead of being part of "edit". In light of this, I was able to majorly refactor my code and address concerns I had about reuse and efficiency. There are still outstanding issues tho:
Due to this change / refactor this was not completed. I plan to ask for help tomorrow.
The above checklist is up to date. I have started with the merge but have one outstanding question for Phil.
@mheppler this branch is ready for you to do you UI fixes. The one UI thing to note is that I have implemented the alert text to be fairly generic instead of what is in the mock-up above. As we move forward we could have an entry in our modular config for the text when there is an alert, but it seemed like there maybe should be more discussion before going this route. See below for a screenshot.

I have started with the merge but have one outstanding question for Phil.
What's your concern, @matthew-a-dunlap ?
Improved style/format for message block and info popup for privacy-preserving preview on dataset pg.
Note: @dlmurphy -- I tried to revise the text that goes with PSI tool in the modular configure popup.

@mheppler I've further revised the text for that popup. I've made it more about what PSI is and what it allows, since this will be many users' first exposure to it. I left out the info about how to use the tool, since the budgeter tool itself contains a thorough tutorial. It's up to you whether you want to include that hyperlink! It leads to a paper meant to explain PSI to a non-technical audience.
Privacy-Preserving Data Preview
Use the PSI Budgeter tool to create safe, privacy-preserving summary statistics for this data file. The tool protects data using the differential privacy framework. It allows you to introduce just enough noise into your summary statistics to ensure privacy while still allowing a useful (if blurry) window into the contents of your data. Dataverse users will be able to explore a preview of your data without any danger of exposing private information.
@dlmurphy @mheppler I'll add that text change in after finishing up this big merge.
I take that back, we moved those to the psi.json that is no longer in the project! So I can't update it hah.
There is an outstanding need to add exception handling to parseQueryString, which will be done on this branch instead of 4230.
Yes, @scolapasta @matthew-a-dunlap and I discussed this issue and #4230 this morning and we decided that since the issue about the UI is close to being done, we'll have single pull request based on the branch 4230-4233-external-tool-psi that we'll put through QA.
On that branch I've been completing the work for #4230 and I just went to take a look at the GUI for this issue. Unfortunately, as of 553d8d4 I can't create a dataset. I'm getting javax.el.ELException: /dataset.xhtml @1188,163 rendered="#{DatasetPage.sessionUserAuthenticated and DatasetPage.canUpdateDataset()}": javax.ejb.EJBException and Caused by: java.lang.IllegalArgumentException: Cannot query permissions on a DvObject with a null id. I'm attaching the full stack trace. This is the code:
<p:dialog header="#{configureFragmentBean.configurePopupToolHandler.externalTool.displayName}" widgetVar="configureToolPopup" modal="true"
id="configureToolPopup" styleClass="smallPopUp" rendered="#{DatasetPage.sessionUserAuthenticated and DatasetPage.canUpdateDataset()}">
I was attempting to create the dataset in the root dataverse, if that matters.
create-dataset-in-root-553d8d4.txt
@matthew-a-dunlap said he'd take a look.
Here is the list of code review feedback on the UI side of modular configure: