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

11159 Add more information about anonymous access Preview URL #11164

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/release-notes/11159-preview-url-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Preview URL popup updated

The Preview URL popup has been updated to give the dataset more information about anonymous access including the names of the dataset fields that will be withheld from the url user and suggesting how to review the url before releasing it. See also #11159 and #11164.
15 changes: 12 additions & 3 deletions doc/sphinx-guides/source/user/dataset-management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -683,17 +683,26 @@ If you have a Contributor role (can edit metadata, upload files, and edit files,
Preview URL to Review Unpublished Dataset
=========================================

Creating a Preview URL for your dataset allows you to share your dataset (for viewing and downloading of files) before it is published to a wide group of individuals who may not have a user account on the Dataverse installation. Anyone you send the Preview URL to will not have to log into the Dataverse installation to view the dataset.
Creating a Preview URL for a draft version your dataset allows you to share your dataset (for viewing and downloading of files) before it is published to a wide group of individuals who may not have a user account on the Dataverse installation. Anyone you send the Preview URL to will not have to log into the Dataverse installation to view the unpublished dataset. Once a dataset has been published you may continue to use the General Preview URL for future drafts, but the Anonymous Preview URL will no longer be available.

**Note:** To create a Preview URL, you must have the *ManageDatasetPermissions* permission for your dataset, usually given by the :ref:`roles <permissions>` *Curator* or *Administrator*.
**Note:** To create a Preview URL, you must have the *ManageDatasetPermissions* permission for your draft dataset, usually given by the :ref:`roles <permissions>` *Curator* or *Administrator*.

#. Go to your unpublished dataset
#. Select the “Edit” button
#. Select “Preview URL” in the dropdown menu
#. In the pop-up select “Create General Preview URL” or "Create URL for Anonymized Access". The latter supports anonymous review by removing author names and other potentially identifying information from citations, version history tables, and some metadata fields (as configured by the administrator).
#. In the pop-up select “Create General Preview URL” or "Create Anonymous Preview URL". The latter supports anonymous review by removing author names and other potentially identifying information from citations, version history tables, and some metadata fields (as configured by the administrator).
#. Copy the Preview URL which has been created for this dataset and it can now be shared with anyone you wish to have access to view or download files in your unpublished dataset.

To disable a Preview URL and to revoke access, follow the same steps as above until step #3 when you return to the popup, click the “Disable Preview URL” button.

**Note:** Before distributing an anonymized Preview URL it is recommended that you view the dataset as a potential user to verify that the metadata available does not reveal authorship, etc.

#. Create Anonymous Preview URL for your unpublished dataset via the Preview URL popup from Edit Dataset button
#. Copy the Anonymous Preview URL to your clipboard
#. Log out of Dataverse application
#. Open the dataset via the Anonymous Preview URL you plan to distribute to view the draft dataset as a reviewer would see it
#. It may be necessary for you to further edit your draft dataset's metadata to remove identifying items before you distribute the Anonymous Preview URL

Note that only one Preview URL (normal or with anonymized access) can be configured per dataset at a time.

Embargoes
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -5719,6 +5719,22 @@ public boolean isAnonymizedAccessEnabled() {
return false;
}
}

String anonymizedFieldTypeNames = null;

public String getAnonymizedFieldTypeNames() {
if (anonymizedFieldTypeNames != null) {
return anonymizedFieldTypeNames;
}
if (settingsWrapper.getValueForKey(SettingsServiceBean.Key.AnonymizedFieldTypeNames) != null) {
anonymizedFieldTypeNames = settingsWrapper.getValueForKey(SettingsServiceBean.Key.AnonymizedFieldTypeNames);

} else {
anonymizedFieldTypeNames = "";

}
return anonymizedFieldTypeNames;
}

// todo: we should be able to remove - this is passed in the html pages to other fragments, but they could just access this service bean directly.
public FileDownloadServiceBean getFileDownloadService() {
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/propertyFiles/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1762,19 +1762,21 @@ dataset.transferUnrestricted=Click Continue to transfer the elligible files.

dataset.requestAccessToRestrictedFiles=You may request access to any restricted file(s) by clicking the Request Access button.
dataset.requestAccessToRestrictedFilesWithEmbargo=Embargoed files cannot be accessed during the embargo period. If your selection contains restricted files, you may request access to them by clicking the Request Access button.
dataset.privateurl.infoMessageAuthor=Privately share this dataset before it is published: {0}
dataset.privateurl.infoMessageAuthor=Privately share this draft dataset before it is published: {0}
dataset.privateurl.infoMessageReviewer=You are viewing a preview of this unpublished dataset version.
dataset.privateurl.header=Unpublished Dataset Preview URL
dataset.privateurl.tip=To cite this data in publications, use the dataset's persistent ID instead of this URL. For more information about the Preview URL feature, please refer to the <a href="{0}/{1}/user/dataset-management.html#private-url-to-review-unpublished-dataset" title="Preview URL for Reviewing an Unpublished Dataset - Dataverse User Guide" target="_blank">User Guide</a>.
dataset.privateurl.onlyone=Only one Preview URL can be active for a single dataset.
dataset.privateurl.onlyone=Only one Preview URL can be active for a single draft dataset.
dataset.privateurl.absent=Preview URL has not been created.
dataset.privateurl.general.button.label=Create General Preview URL
dataset.privateurl.general.description=Create a URL that others can use to review this dataset version before it is published. They will be able to access all files in the dataset and see all metadata, including metadata that may identify the dataset's authors.
dataset.privateurl.general.description=Create a URL that others can use to review this draft dataset version before it is published. They will be able to access all files in the dataset and see all metadata, including metadata that may identify the dataset's authors.
dataset.privateurl.general.title=General Preview
dataset.privateurl.anonymous.title=Anonymous Preview
dataset.privateurl.anonymous.tooltip.preface=The following metadata fields will be hidden from the user of this Anonymous Preview URL:
dataset.privateurl.anonymous.button.label=Create Anonymous Preview URL
dataset.privateurl.anonymous.description=Create a URL that others can use to access an anonymized view of this unpublished dataset version. Metadata that could identify the dataset author will not be displayed. Non-identifying metadata will be visible.
dataset.privateurl.anonymous.description=Create a URL that others can use to access an anonymized view of this unpublished dataset version. Metadata that could identify the dataset's author will not be displayed. (See Tool Tip for the list of withheld metadata fields.) Non-identifying metadata will be visible.
dataset.privateurl.anonymous.description.paragraph.two=The dataset's files are not changed and users of the Anonymous Preview URL will be able to access them. Users of the Anonymous Preview URL will not be able to see the name of the Dataverse that this dataset is in but will be able to see the name of the repository, which might expose the dataset authors' identities.
dataset.privateurl.anonymous.description.paragraph.three=<b>To verify that all identifying information has been removed or anonymized, it is recommended that you logout and review the dataset as as it would be seen by an Anonymous Preview URL user.</b> See <a href="{2}/{3}/user/dataset-management.html#preview-url-to-review-unpublished-dataset" target="_blank" rel="noopener">User Guide</a> for more information.
dataset.privateurl.createPrivateUrl=Create Preview URL
dataset.privateurl.introduction=You can create a Preview URL to copy and share with others who will not need a repository account to review this unpublished dataset version. Once the dataset is published or if the URL is disabled, the URL will no longer work and will point to a "Page not found" page.
dataset.privateurl.createPrivateUrl.anonymized=Create URL for Anonymized Access
Expand Down
20 changes: 14 additions & 6 deletions src/main/webapp/dataset.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -1177,14 +1177,14 @@
<p:dialog id="privateUrlId" styleClass="smallPopUp" header="#{bundle['dataset.privateurl.header']}" widgetVar="privateUrlConfirmation" modal="true">
<p:fragment id="privateUrlPanel" rendered="#{DatasetPage.userCanCreatePrivateURL}">
<p class="help-block">
<p>#{bundle['dataset.privateurl.introduction']}</p>
<p>#{bundle['dataset.privateurl.introduction']}
#{bundle['dataset.privateurl.onlyone']} </p>
<p>
<h:outputFormat value="#{bundle['dataset.privateurl.tip']}" escape="false">
<f:param value="#{systemConfig.guidesBaseUrl}"/>
<f:param value="#{systemConfig.guidesVersion}"/>
</h:outputFormat>
</p>
<p>#{bundle['dataset.privateurl.onlyone']}</p>
</p>
</p>

<p>
Expand Down Expand Up @@ -1221,10 +1221,18 @@
<p:fragment rendered="#{DatasetPage.anonymizedAccessEnabled}">
<p>
<p>
<h:outputText styleClass="highlightBold" value="#{bundle['dataset.privateurl.anonymous.title']}"></h:outputText></p>
<h:outputText styleClass="highlightBold" value="#{bundle['dataset.privateurl.anonymous.title']}"></h:outputText>
<span class="glyphicon glyphicon-question-sign tooltip-icon"
data-toggle="tooltip" data-placement="auto right" data-original-title="#{bundle['dataset.privateurl.anonymous.tooltip.preface']} #{DatasetPage.getAnonymizedFieldTypeNames()} "></span>
</p>
<p>#{bundle['dataset.privateurl.anonymous.description']}</p>
<p>#{bundle['dataset.privateurl.anonymous.description.paragraph.two']} #{bundle['dataset.privateurl.createPrivateUrl.anonymized.unavailable']}.</p>

<p>#{bundle['dataset.privateurl.anonymous.description.paragraph.two']}</p>
<h:outputFormat value="#{bundle['dataset.privateurl.anonymous.description.paragraph.three']}" escape="false">
<f:param value="#{systemConfig.guidesBaseUrl}"/>
<f:param value="#{systemConfig.guidesVersion}"/>
</h:outputFormat>
<p>#{bundle['dataset.privateurl.createPrivateUrl.anonymized.unavailable']}</p>


<p:commandButton styleClass="btn btn-default disabledTitle"
value="#{bundle['dataset.privateurl.anonymous.button.label']}"
Expand Down