Skip to content

Commit

Permalink
#8184 ui-bundle changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Oct 8, 2024
1 parent d50c484 commit cd2fa36
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 46 deletions.
60 changes: 30 additions & 30 deletions src/main/java/edu/harvard/iq/dataverse/privateurl/package-info.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Private URL for unpublished datasets.
* Preview URL for unpublished datasets.
* <p>
* The Private URL feature has been implemented as a specialized role assignment
* The Preview (formerly Private) URL feature has been implemented as a specialized role assignment
* with an associated token that permits read-only access to the metadata and
* all files (regardless of if the files are restricted or not) of a draft
* version of a dataset.
* <p>
* As of this note, a second option - to create a Private URL that provides an
* As of this note, a second option - to create a Preview URL that provides an
* anonymized view of the dataset has been added. This option works the same as
* the original except that it hides author names in the citation block, hides
* the values for an admin specified list of metadata fields, disables citation
* downloads, and disables API access (except for file and file thumbnail
* downloads which are used by the UI).
* <p>
* The primary use case for a Private URL is for journal editors to send a link
* The primary use case for a Preview URL is for journal editors to send a link
* to reviewers of a dataset before publication. In most cases, these journal
* editors do not permit depositors to publish on their own, which is to say
* they only allow depositors to have the "Contributor" role on the datasets
Expand All @@ -24,42 +24,42 @@
* the depositor, who is in charge of both the security of the dataset and the
* timing of when the dataset is published.
* <p>
* A secondary use case for a Private URL is for depositors who have the ability
* A secondary use case for a Preview URL is for depositors who have the ability
* to manage permissions on their dataset (depositors who have the "Curator" or
* "Admin" role, which grants much more power than the "Contributor" role) to
* send a link to coauthors or other trusted parties to preview the dataset
* before the depositors publish the dataset on their own. For better security,
* these depositors could ask their coauthors to create Dataverse accounts and
* assign roles to them directly, rather than using a Private URL which requires
* assign roles to them directly, rather than using a Preview URL which requires
* no username or password.
* <p>
* As of this note, a second option aimed specifically at the review use case -
* to create a Private URL that provides an anonymized view of the dataset - has
* to create a Preview URL that provides an anonymized view of the dataset - has
* been added. This option works the same as the original except that it hides
* author names in the citation block, hides the values for an admin specified
* list of metadata fields, disables citation downloads, and disables API access
* (except for file and file thumbnail downloads which are used by the UI).
* <p>
* The token associated with the Private URL role assignment that can be used
* The token associated with the Preview URL role assignment that can be used
* either in the GUI or, for the non-anonymized-access option, via the API to
* elevate privileges beyond what a "Guest" can see. The ability to use a
* Private URL token via API was added mostly to facilitate automated testing of
* the feature but the far more common case is expected to be use of the Private
* Preview URL token via API was added mostly to facilitate automated testing of
* the feature but the far more common case is expected to be use of the Preview
* URL token in a link that is clicked to open a browser, similar to links
* shared via Dropbox, Google, etc.
* <p>
* When reviewers click a Private URL their browser sessions are set to the
* When reviewers click a Preview URL their browser sessions are set to the
* "{@link edu.harvard.iq.dataverse.authorization.users.PrivateUrlUser}" that
* has the "Member" role only on the dataset in question and redirected to that
* dataset, where they will see an indication in blue at the top of the page
* that they are viewing an unpublished dataset. If the reviewer happens to be
* logged into Dataverse already, clicking the link will log them out because
* the review is meant to be blind. Because the dataset is always in draft when
* a Private URL is in effect, no downloads or any other activity by the
* reviewer are logged to the guestbook. All reviewers click the same Private
* a Preview URL is in effect, no downloads or any other activity by the
* reviewer are logged to the guestbook. All reviewers click the same Preview
* URL containing the same token, and with the exception of an IP address being
* logged, it should be impossible to trace which reviewers have clicked a
* Private URL. If the reviewer navigates to the home page, the session is set
* Preview URL. If the reviewer navigates to the home page, the session is set
* to the Guest user and they will see what a Guest would see.
* <p>
* The "Member" role is used because it contains the necessary read-only
Expand All @@ -76,51 +76,51 @@
* version. A Member can also download restricted files that have been deleted
* from previously published versions.
* <p>
* Likewise, when a Private URL token is used via API, commands are executed
* Likewise, when a Preview URL token is used via API, commands are executed
* using the "PrivateUrlUser" that has the "Member" role only on the dataset in
* question. This means that read-only operations such as downloads of the
* dataset's files are permitted. The Search API does not respect the Private
* dataset's files are permitted. The Search API does not respect the Preview
* URL token but you can download files using the Access API, and, with the
* non-anonymized-access option, download unpublished metadata using the Native
* API.
* <p>
* A Private URL cannot be created for a published version of a dataset. In the
* A Preview URL cannot be created for a published version of a dataset. In the
* GUI, you will be reminded of this fact with a popup. The API will explain
* this as well.
* <p>
* An anonymized-access Private URL can't be created if any published dataset
* An anonymized-access Preview URL can't be created if any published dataset
* version exists. The primary reason for this is that, since datasets have
* DOIs, the full metadata about published versions is available directly from
* the DOI provider. (While the metadata for that version could be somewhat
* different, in practice it would probably provide a means of identifying
* some/all of the authors).
* <p>
* If a draft dataset containing a Private URL is
* published, the Private URL is deleted. This means that reviewers who click
* If a draft dataset containing a Preview URL is
* published, the Preview URL is deleted. This means that reviewers who click
* the link after publication will see a 404.
* <p>
* If a post-publication draft containing a Private URL is deleted, the Private
* If a post-publication draft containing a Preview URL is deleted, the Preview
* URL is deleted. This is to ensure that if a new draft is created in the
* future, a new token will be used.
* <p>
* The creation and deletion of a Private URL are limited to the "Curator" and
* The creation and deletion of a Preview URL are limited to the "Curator" and
* "Admin" roles because only those roles have the permission called
* "ManageDatasetPermissions", which is the permission used by the
* "AssignRoleCommand" and "RevokeRoleCommand" commands. If you have the
* permission to create or delete a Private URL, the fact that a Private URL is
* permission to create or delete a Preview URL, the fact that a Preview URL is
* enabled for a dataset will be indicated in blue at the top of the page.
* Success messages are shown at the top of the page when you create or delete a
* Private URL. In the GUI, deleting a Private URL is called "disabling" and you
* Preview URL. In the GUI, deleting a Preview URL is called "disabling" and you
* will be prompted for a confirmation. No matter what you call it the role is
* revoked. You can also delete a Private URL by revoking the role.
* revoked. You can also delete a Preview URL by revoking the role.
* <p>
* A "Contributor" does not have the "ManageDatasetPermissions" permission and
* cannot see "Permissions" nor "Private URL" under the "Edit" menu of their
* dataset. When a Curator or Admin has enabled a Private URL on a Contributor's
* dataset, the Contributor does not see a visual indication that a Private URL
* cannot see "Permissions" nor "Preview URL" under the "Edit" menu of their
* dataset. When a Curator or Admin has enabled a Preview URL on a Contributor's
* dataset, the Contributor does not see a visual indication that a Preview URL
* has been enabled for their dataset.
* <p>
* There is no way for an "Admin" or "Curator" to see when a Private URL was
* There is no way for an "Admin" or "Curator" to see when a Preview URL was
* created or deleted for a dataset but someone who has access to the database
* can see that the following commands are logged to the "actionlogrecord"
* database table:
Expand All @@ -129,7 +129,7 @@
* <li>{@link edu.harvard.iq.dataverse.engine.command.impl.CreatePrivateUrlCommand}</li>
* <li>{@link edu.harvard.iq.dataverse.engine.command.impl.DeletePrivateUrlCommand}</li>
* </ul>
* See also the Private URL To Unpublished Dataset BRD at <a href=
* See also the Preview URL To Unpublished Dataset BRD at <a href=
* "https://docs.google.com/document/d/1FT47QkZKcmjSgRnePaJO2g1nzcotLyN3Yb2ORvBr6cs/edit?usp=sharing">
* https://docs.google.com/document/d/1FT47QkZKcmjSgRnePaJO2g1nzcotLyN3Yb2ORvBr6cs/edit?usp=sharing</a>
*/
Expand Down
32 changes: 16 additions & 16 deletions src/main/java/propertyFiles/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ dataset.editBtn.itemLabel.metadata=Metadata
dataset.editBtn.itemLabel.terms=Terms
dataset.editBtn.itemLabel.permissions=Permissions
dataset.editBtn.itemLabel.thumbnailsAndWidgets=Thumbnails + Widgets
dataset.editBtn.itemLabel.privateUrl=Private URL
dataset.editBtn.itemLabel.privateUrl=Preview URL
dataset.editBtn.itemLabel.permissionsDataset=Dataset
dataset.editBtn.itemLabel.permissionsFile=Restricted Files
dataset.editBtn.itemLabel.deleteDataset=Delete Dataset
Expand Down Expand Up @@ -1722,22 +1722,22 @@ dataset.requestAccessToRestrictedFiles=You may request access to any restricted
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.infoMessageReviewer=This unpublished dataset is being privately shared.
dataset.privateurl.header=Unpublished Dataset Private URL
dataset.privateurl.tip=Use a Private URL to allow those without Dataverse accounts to access your unpublished dataset. For more information about the Private URL feature, please refer to the <a href="{0}/{1}/user/dataset-management.html#private-url-to-review-unpublished-dataset" title="Private URL for Reviewing an Unpublished Dataset - Dataverse User Guide" target="_blank">User Guide</a>.
dataset.privateurl.absent=Private URL has not been created.
dataset.privateurl.createPrivateUrl=Create Private URL
dataset.privateurl.header=Unpublished Dataset Preview URL
dataset.privateurl.tip=Use a Preview URL to allow those without Dataverse accounts to access your unpublished dataset. 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.absent=Preview URL has not been created.
dataset.privateurl.createPrivateUrl=Create Preview URL
dataset.privateurl.createPrivateUrl.anonymized=Create URL for Anonymized Access
dataset.privateurl.createPrivateUrl.anonymized.unavailable=Anonymized Access is not available once a version of the dataset has been published
dataset.privateurl.disablePrivateUrl=Disable Private URL
dataset.privateurl.disablePrivateUrlConfirm=Yes, Disable Private URL
dataset.privateurl.disableConfirmationText=Are you sure you want to disable the Private URL? If you have shared the Private URL with others they will no longer be able to use it to access your unpublished dataset.
dataset.privateurl.cannotCreate=Private URL can only be used with unpublished versions of datasets.
dataset.privateurl.roleassigeeTitle=Private URL Enabled
dataset.privateurl.disablePrivateUrl=Disable Preview URL
dataset.privateurl.disablePrivateUrlConfirm=Yes, Disable Preview URL
dataset.privateurl.disableConfirmationText=Are you sure you want to disable the Preview URL? If you have shared the Preview URL with others they will no longer be able to use it to access your unpublished dataset.
dataset.privateurl.cannotCreate=Preview URL can only be used with unpublished versions of datasets.
dataset.privateurl.roleassigeeTitle=Preview URL Enabled
dataset.privateurl.createdSuccess=Success!
dataset.privateurl.full=This Private URL provides full read access to the dataset
dataset.privateurl.anonymized=This Private URL provides access to the anonymized dataset
dataset.privateurl.disabledSuccess=You have successfully disabled the Private URL for this unpublished dataset.
dataset.privateurl.noPermToCreate=To create a Private URL you must have the following permissions: {0}.
dataset.privateurl.full=This Preview URL provides full read access to the dataset
dataset.privateurl.anonymized=This Preview URL provides access to the anonymized dataset
dataset.privateurl.disabledSuccess=You have successfully disabled the Preview URL for this unpublished dataset.
dataset.privateurl.noPermToCreate=To create a Preview URL you must have the following permissions: {0}.
dataset.externalstatus.header=Curation Status Changed
dataset.externalstatus.removed=Curation Status Removed
dataset.externalstatus.info=Curation Status is now "{0}"
Expand Down Expand Up @@ -2719,8 +2719,8 @@ datasets.api.grant.role.assignee.has.role.error=User already has this role for t
datasets.api.revoke.role.not.found.error="Role assignment {0} not found"
datasets.api.revoke.role.success=Role {0} revoked for assignee {1} in {2}
datasets.api.privateurl.error.datasetnotfound=Could not find dataset.
datasets.api.privateurl.error.alreadyexists=Private URL already exists for this dataset.
datasets.api.privateurl.error.notdraft=Can't create Private URL because the latest version of this dataset is not a draft.
datasets.api.privateurl.error.alreadyexists=Preview URL already exists for this dataset.
datasets.api.privateurl.error.notdraft=Can't create Preview URL because the latest version of this dataset is not a draft.
datasets.api.privateurl.anonymized.error.released=Can't create a URL for anonymized access because this dataset has been published.
datasets.api.creationdate=Date Created
datasets.api.modificationdate=Last Modified Date
Expand Down
15 changes: 15 additions & 0 deletions src/main/webapp/previewurl-popup-fragment.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/XHtml.xhtml to edit this template
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TODO supply a title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div>TODO write content</div>
</body>
</html>

0 comments on commit cd2fa36

Please sign in to comment.