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; Limit Anon Access to Draft Versions #11164

Merged
merged 25 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
65e1e24
#11159 add tool tips to preview url popup
sekmiller Jan 16, 2025
be757a8
#11159 add a release note
sekmiller Jan 16, 2025
6bd91ce
Update dataset-management.rst
sekmiller Jan 16, 2025
458559f
Merge branch 'develop' into 11159-anon-access-doc
sekmiller Jan 17, 2025
9192f1a
Merge branch 'develop' into 11159-anon-access-doc
sekmiller Jan 21, 2025
544acd6
Merge branch 'develop' into 11159-anon-access-doc
sekmiller Jan 22, 2025
96751ac
Merge branch 'develop' into 11159-anon-access-doc
sekmiller Jan 23, 2025
7eec229
Merge branch 'develop' into 11159-anon-access-doc
sekmiller Jan 23, 2025
baa0a90
Update doc/release-notes/11159-preview-url-update.md
sekmiller Jan 27, 2025
474bc8d
Merge branch 'develop' into 11159-anon-access-doc
sekmiller Jan 28, 2025
6b566a4
Merge branch 'develop' into 11159-anon-access-doc
sekmiller Jan 29, 2025
9b44b98
Merge branch 'develop' into 11159-anon-access-doc
sekmiller Jan 30, 2025
70cc95c
Update dataset-management.rst
sekmiller Jan 30, 2025
570e5cd
Update dataset-management.rst
sekmiller Jan 30, 2025
76831f3
#11159 update Preview URL Popup
sekmiller Jan 30, 2025
e98da46
Merge branch 'develop' into 11159-anon-access-doc
sekmiller Jan 30, 2025
60418a2
#11159 remove unused Bundle item
sekmiller Jan 30, 2025
ab75594
Update dataset-management.rst
sekmiller Jan 30, 2025
0ca44a0
#11159 add more notation of Draft only
sekmiller Jan 30, 2025
c66bec1
Merge branch 'develop' into 11159-anon-access-doc
sekmiller Jan 31, 2025
1baf611
#11159 fix anon access on published datasets
sekmiller Jan 31, 2025
d468038
#11159 add bug fix rel. note
sekmiller Jan 31, 2025
818b786
Update dataset-management.rst
sekmiller Jan 31, 2025
afed955
Update doc/sphinx-guides/source/user/dataset-management.rst
sekmiller Feb 3, 2025
1685a83
Update doc/sphinx-guides/source/user/dataset-management.rst
sekmiller Feb 3, 2025
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
7 changes: 7 additions & 0 deletions doc/release-notes/11159-preview-url-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Preview URL popup updated

The Preview URL popup and related documentation 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.

###Bug Fix

Bug which causes users of the Anonymous Review URL to have some metadata of published datasets withheld has been fixed. See #11202
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 create new General Preview URLs for subsequent draft versions, but the Anonymous Preview URL will no longer be available.
sekmiller marked this conversation as resolved.
Show resolved Hide resolved

**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
sekmiller marked this conversation as resolved.
Show resolved Hide resolved
#. 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
19 changes: 18 additions & 1 deletion src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -1985,6 +1985,7 @@ private String init(boolean initFull) {
setDataverseSiteUrl(systemConfig.getDataverseSiteUrl());

guestbookResponse = new GuestbookResponse();
anonymizedAccess = null;

String sortOrder = getSortOrder();
if(sortOrder != null) {
Expand Down Expand Up @@ -5695,7 +5696,7 @@ public String getPrivateUrlLink(PrivateUrl privateUrl) {

public boolean isAnonymizedAccess() {
if (anonymizedAccess == null) {
if (session.getUser() instanceof PrivateUrlUser) {
if (session.getUser() instanceof PrivateUrlUser && workingVersion.isDraft()) {
anonymizedAccess = ((PrivateUrlUser) session.getUser()).hasAnonymizedAccess();
} else {
anonymizedAccess = false;
Expand All @@ -5719,6 +5720,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