From d3de1fa8f0e4d29db512210bbb5eadedba14bf00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Haarla=CC=88nder?= Date: Mon, 23 May 2022 14:27:42 +0200 Subject: [PATCH 01/25] #IQSS/8726 better HTTP range request support --- src/main/java/edu/harvard/iq/dataverse/api/Access.java | 7 +++++-- .../edu/harvard/iq/dataverse/api/ApiBlockingFilter.java | 3 ++- .../harvard/iq/dataverse/api/DownloadInstanceWriter.java | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/api/Access.java b/src/main/java/edu/harvard/iq/dataverse/api/Access.java index b2a8da3af4c..cfb30cc0753 100644 --- a/src/main/java/edu/harvard/iq/dataverse/api/Access.java +++ b/src/main/java/edu/harvard/iq/dataverse/api/Access.java @@ -278,7 +278,7 @@ private DataFile findDataFileOrDieWrapper(String fileId){ @Path("datafile/{fileId:.+}") @GET @Produces({"application/xml"}) - public DownloadInstance datafile(@PathParam("fileId") String fileId, @QueryParam("gbrecs") boolean gbrecs, @QueryParam("key") String apiToken, @Context UriInfo uriInfo, @Context HttpHeaders headers, @Context HttpServletResponse response) /*throws NotFoundException, ServiceUnavailableException, PermissionDeniedException, AuthorizationRequiredException*/ { + public Response datafile(@PathParam("fileId") String fileId, @QueryParam("gbrecs") boolean gbrecs, @QueryParam("key") String apiToken, @Context UriInfo uriInfo, @Context HttpHeaders headers, @Context HttpServletResponse response) /*throws NotFoundException, ServiceUnavailableException, PermissionDeniedException, AuthorizationRequiredException*/ { // check first if there's a trailing slash, and chop it: while (fileId.lastIndexOf('/') == fileId.length() - 1) { @@ -423,7 +423,10 @@ public DownloadInstance datafile(@PathParam("fileId") String fileId, @QueryParam /* * Provide some browser-friendly headers: (?) */ - return downloadInstance; + if (headers.getRequestHeaders().containsKey("Range")) { + return Response.status(Response.Status.PARTIAL_CONTENT).entity(downloadInstance).build(); + } + return Response.ok(downloadInstance).build(); } diff --git a/src/main/java/edu/harvard/iq/dataverse/api/ApiBlockingFilter.java b/src/main/java/edu/harvard/iq/dataverse/api/ApiBlockingFilter.java index 6f7a1d876a1..6bf852d25f7 100644 --- a/src/main/java/edu/harvard/iq/dataverse/api/ApiBlockingFilter.java +++ b/src/main/java/edu/harvard/iq/dataverse/api/ApiBlockingFilter.java @@ -163,7 +163,8 @@ public void doFilter(ServletRequest sr, ServletResponse sr1, FilterChain fc) thr if (settingsSvc.isTrueForKey(SettingsServiceBean.Key.AllowCors, true )) { ((HttpServletResponse) sr1).addHeader("Access-Control-Allow-Origin", "*"); ((HttpServletResponse) sr1).addHeader("Access-Control-Allow-Methods", "PUT, GET, POST, DELETE, OPTIONS"); - ((HttpServletResponse) sr1).addHeader("Access-Control-Allow-Headers", "Accept, Content-Type, X-Dataverse-Key"); + ((HttpServletResponse) sr1).addHeader("Access-Control-Allow-Headers", "Accept, Content-Type, X-Dataverse-Key, Range"); + ((HttpServletResponse) sr1).addHeader("Access-Control-Expose-Headers", "Accept-Ranges, Content-Range, Content-Encoding"); } fc.doFilter(sr, sr1); } catch ( ServletException se ) { diff --git a/src/main/java/edu/harvard/iq/dataverse/api/DownloadInstanceWriter.java b/src/main/java/edu/harvard/iq/dataverse/api/DownloadInstanceWriter.java index 84a31959286..78fdb261d38 100644 --- a/src/main/java/edu/harvard/iq/dataverse/api/DownloadInstanceWriter.java +++ b/src/main/java/edu/harvard/iq/dataverse/api/DownloadInstanceWriter.java @@ -434,6 +434,9 @@ public void writeTo(DownloadInstance di, Class clazz, Type type, Annotation[] offset = ranges.get(0).getStart(); leftToRead = rangeContentSize; + httpHeaders.add("Accept-Ranges", "bytes"); + httpHeaders.add("Content-Range", "bytes "+offset+"-"+(offset+rangeContentSize-1)+"/"+contentSize); + } } else { // Content size unknown, must be a dynamically From 320274ebd34edf983d8872ba773ec244adf14c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Haarla=CC=88nder?= Date: Wed, 1 Jun 2022 09:51:20 +0200 Subject: [PATCH 02/25] #IQSS/8757 deactivate file restriction for PublicInstall --- src/main/webapp/editFilesFragment.xhtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/editFilesFragment.xhtml b/src/main/webapp/editFilesFragment.xhtml index 883949d0441..5013eacb159 100644 --- a/src/main/webapp/editFilesFragment.xhtml +++ b/src/main/webapp/editFilesFragment.xhtml @@ -440,7 +440,7 @@ -
  • +
  • @@ -449,7 +449,7 @@
  • -
  • +
  • Date: Thu, 2 Jun 2022 17:02:11 -0400 Subject: [PATCH 03/25] add 5.11 release notes --- doc/release-notes/5.11-release-notes.md | 185 ++++++++++++++++++ doc/release-notes/5663-shib-confirm-email.md | 7 - .../7492_muting_notifications.md | 9 - doc/release-notes/8227-verify-email.md | 1 - .../8295-support-postgresql-14.md | 8 - .../8380-counter-processor-update.md | 1 - doc/release-notes/8456-upgrade-primefaces.md | 4 - .../8525-ingest-optional-skip.md | 1 - .../8533_semantic-api-updates.md | 14 -- ...icense-info-in-submit-for-review-pop-up.md | 1 - .../8595-cvv-field-solr-update.md | 3 - doc/release-notes/8600-duplicate-templates.md | 9 - .../8608-bagit-support-validate-checksums.md | 10 - .../8663-update-create-ds-doc.md | 5 - doc/release-notes/ds54-csp.md | 1 - 15 files changed, 185 insertions(+), 74 deletions(-) create mode 100644 doc/release-notes/5.11-release-notes.md delete mode 100644 doc/release-notes/5663-shib-confirm-email.md delete mode 100644 doc/release-notes/7492_muting_notifications.md delete mode 100644 doc/release-notes/8227-verify-email.md delete mode 100644 doc/release-notes/8295-support-postgresql-14.md delete mode 100644 doc/release-notes/8380-counter-processor-update.md delete mode 100644 doc/release-notes/8456-upgrade-primefaces.md delete mode 100644 doc/release-notes/8525-ingest-optional-skip.md delete mode 100644 doc/release-notes/8533_semantic-api-updates.md delete mode 100644 doc/release-notes/8561-license-info-in-submit-for-review-pop-up.md delete mode 100644 doc/release-notes/8595-cvv-field-solr-update.md delete mode 100644 doc/release-notes/8600-duplicate-templates.md delete mode 100644 doc/release-notes/8608-bagit-support-validate-checksums.md delete mode 100644 doc/release-notes/8663-update-create-ds-doc.md delete mode 100644 doc/release-notes/ds54-csp.md diff --git a/doc/release-notes/5.11-release-notes.md b/doc/release-notes/5.11-release-notes.md new file mode 100644 index 00000000000..8bcceac6b08 --- /dev/null +++ b/doc/release-notes/5.11-release-notes.md @@ -0,0 +1,185 @@ +# Dataverse Software 5.11 + +This release brings new features, enhancements, and bug fixes to the Dataverse Software. Thank you to all of the community members who contributed code, suggestions, bug reports, and other assistance across the project. + +## Release Highlights + +### Terms of Access or Request Access Required for Restricted Files + +Beginning in this release, Restricted Files must have either Terms of Access or Request Access enabled. This change is to ensure that for each file in a Dataverse installation there is a clear path to get to the data, either through requesting access to the data or to provide context about why requesting access is not enabled. See #8191. + +In the "Notes for Dataverse Installation Administrators" section, we have provided a query to help proactively identify datasets that need to be updated. + +### Muting Notifications + +Users can control which notifications they receive if the system is [configured to allow this](https://guides.dataverse.org/en/5.11/admin/user-administration.html#letting-users-manage-receiving-notifications). See #7492. + +## Major Use Cases and Infrastructure Enhancements + +Changes and fixes in this release include: + +- Terms of Access or Request Access required for restricted files. (Issue #8191, PR #8308) +- Users can control which notifications they receive if the system is [configured to allow this](https://guides.dataverse.org/en/5.11/admin/user-administration.html#letting-users-manage-receiving-notifications). (Issue #7492, PR #8530) +- Tabular ingest can be skipped via API. (Issue #8525, PR #8532) +- The "Verify Email" button has been changed to "Send Verification Email" and rather than sometimes showing a popup now always sends a fresh verification email (and invalidates previous verification emails). (Issue #8227, PR #8579) +- For Shibboleth users, the `emailconfirmed` timestamp is now set on login for Shibboleth users and the UI should show "Verified". (Issue #5663, PR #8579) +- Information about the license selection (or custom terms) is now available in the confirmation popup when contributors click "Submit for Review". Previously, this was only available in the confirmation popup for the "Publish" button, which contributors do not see. (Issue #8561, PR #8691) +- For installations configured to support multiple languages, controlled vocabulary fields that do not allow multiple entries (e.g. journalArticleType) are now indexed properly. (Issue #8595, PR #8601, PR #8624) +- Harvesting now works when the Dublin core "language" field is set is set #8139. (Issue #8139, PR #8689) +- The API endpoint for listing notifications has been enhanced to show the subject, text, and timestamp of notifications. (Issue #8487, PR #8530) +- The API Guide has been updated to explain that the `Content-type` header is now (as of Dataverse 5.6) necessary to create datasets via native API. (Issue #8663, PR #8676) +- Admin API endpoints have been added to find and delete dataset templates. (Issue 8600, PR #8706) +- The BagIt file handler detects and transforms zip files with a BagIt package format into Dataverse data files, validating checksums along the way. See the [BagIt File Handler](https://guides.dataverse.org/en/5.11/installation//config.html#bagit-file-handler) section of the Installation Guide for details. (Issue #8608, PR #8677) +- PostgreSQL 14 can now be used (though we've tested mostly with 13). PostgreSQL 10+ is required. (Issue #8295, PR #8296) +- As always, widgets can be embedded in the `