From c7f53d489da7c5e338f472410c94d55c4832c646 Mon Sep 17 00:00:00 2001 From: Steven Winship <39765413+stevenwinship@users.noreply.github.com> Date: Wed, 17 Dec 2025 13:48:30 -0500 Subject: [PATCH 01/12] Add ackowledgment before publishing --- .../edu/harvard/iq/dataverse/DatasetPage.java | 9 +++++++++ src/main/java/propertyFiles/Bundle.properties | 1 + src/main/webapp/dataset.xhtml | 18 ++++++++++++++---- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java index 20617160a1c..1533306b511 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java @@ -6251,6 +6251,7 @@ public void setFileMetadataForAction(FileMetadata fileMetadataForAction) { private String termsOfAccess; private boolean fileAccessRequest; + private boolean legalDisclaimerAcknowledged; public String getTermsOfAccess() { return termsOfAccess; @@ -6268,6 +6269,14 @@ public void setFileAccessRequest(boolean fileAccessRequest) { this.fileAccessRequest = fileAccessRequest; } + public boolean isLegalDisclaimerAcknowledged() { + return legalDisclaimerAcknowledged; + } + + public void setLegalDisclaimerAcknowledged(boolean legalDisclaimerAcknowledged) { + this.legalDisclaimerAcknowledged = legalDisclaimerAcknowledged; + } + // wrapper method to see if the file has been deleted (or replaced) in the current version public boolean isFileDeleted (DataFile dataFile) { if (dataFile.getDeleted() == null) { diff --git a/src/main/java/propertyFiles/Bundle.properties b/src/main/java/propertyFiles/Bundle.properties index f801c762752..a2f460fcb72 100644 --- a/src/main/java/propertyFiles/Bundle.properties +++ b/src/main/java/propertyFiles/Bundle.properties @@ -1608,6 +1608,7 @@ dataset.reject.failure=Dataset Submission Return Failed - {0} dataset.reject.datasetNull=Cannot return the dataset to the author(s) because it is null. dataset.reject.datasetNotInReview=This dataset cannot be return to the author(s) because the latest version is not In Review. The author(s) needs to click Submit for Review first. dataset.reject.commentNull=You must enter a reason for returning a dataset to the author(s). +dataset.publish.legal.disclaimer=By publishing this dataset, I fully accept all legal responsibility for ensuring that the deposited content is: anonymized, free of copyright violations, and contains data that is computationally reusable. I understand and agree that any violation of these conditions may result in the immediate removal of the dataset by the repository without prior notice. dataset.publish.tip=Are you sure you want to publish this dataset? Once you do so it must remain published. dataset.publish.terms.tip=This version of the dataset will be published with the following terms: dataset.publish.terms.help.tip=To change the terms for this version, click the Cancel button and go to the Terms tab for this dataset. diff --git a/src/main/webapp/dataset.xhtml b/src/main/webapp/dataset.xhtml index 0b16e63ac94..0178774d25d 100644 --- a/src/main/webapp/dataset.xhtml +++ b/src/main/webapp/dataset.xhtml @@ -2029,8 +2029,18 @@

#{bundle['dataset.publish.terms.help.tip']}

+ +
+ + + +
+
-
- +
diff --git a/src/test/java/edu/harvard/iq/dataverse/api/InfoIT.java b/src/test/java/edu/harvard/iq/dataverse/api/InfoIT.java index 4dcbab4093f..81dd20c54fa 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/InfoIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/InfoIT.java @@ -25,18 +25,24 @@ public static void setUpClass() { UtilIT.deleteSetting(SettingsServiceBean.Key.DatasetPublishPopupCustomText); UtilIT.deleteSetting(SettingsServiceBean.Key.ApplicationTermsOfUse); UtilIT.deleteSetting(SettingsServiceBean.Key.ApplicationTermsOfUse, "fr"); + UtilIT.deleteSetting(SettingsServiceBean.Key.PublishDatasetDisclaimerText); } @AfterAll public static void afterClass() { UtilIT.deleteSetting(SettingsServiceBean.Key.MaxEmbargoDurationInMonths); UtilIT.deleteSetting(SettingsServiceBean.Key.DatasetPublishPopupCustomText); + UtilIT.deleteSetting(SettingsServiceBean.Key.PublishDatasetDisclaimerText); } @Test public void testGetDatasetPublishPopupCustomText() { testSettingEndpoint(SettingsServiceBean.Key.DatasetPublishPopupCustomText, "Hello world!"); } + @Test + public void testGetDatasetPublishDisclaimerText() { + testSettingEndpoint(SettingsServiceBean.Key.PublishDatasetDisclaimerText, "Hello world!"); + } @Test public void testGetMaxEmbargoDurationInMonths() { From 6a5ee288985537743a1c93b0b0be2d3b1d6b8e79 Mon Sep 17 00:00:00 2001 From: Steven Winship <39765413+stevenwinship@users.noreply.github.com> Date: Tue, 13 Jan 2026 10:10:09 -0500 Subject: [PATCH 11/12] fix --- src/main/webapp/dataset.xhtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/dataset.xhtml b/src/main/webapp/dataset.xhtml index c98d9271070..4af001afb14 100644 --- a/src/main/webapp/dataset.xhtml +++ b/src/main/webapp/dataset.xhtml @@ -2029,10 +2029,10 @@

#{bundle['dataset.publish.terms.help.tip']}

- +
From c8fbec480b5597985689d46a5150943f4f37f162 Mon Sep 17 00:00:00 2001 From: Steven Winship <39765413+stevenwinship@users.noreply.github.com> Date: Fri, 16 Jan 2026 10:16:19 -0500 Subject: [PATCH 12/12] add cross refference to settings --- doc/sphinx-guides/source/api/native-api.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst index 43599127080..14e899f4c41 100644 --- a/doc/sphinx-guides/source/api/native-api.rst +++ b/doc/sphinx-guides/source/api/native-api.rst @@ -6322,11 +6322,14 @@ The fully expanded example above (without environment variables) looks like this curl "https://demo.dataverse.org/api/info/server" +.. _show-custom-popup-for-publishing-datasets: + Show Custom Popup Text for Publishing Datasets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For now, only the value for the :ref:`:DatasetPublishPopupCustomText` setting from the Configuration section of the Installation Guide is exposed: +.. note:: See :ref:`show-disclaimer-for-publishing-datasets` if you want the user to acknowledge before publishing. .. note:: See :ref:`curl-examples-and-environment-variables` if you are unfamiliar with the use of export below. .. code-block:: bash @@ -6341,9 +6344,14 @@ The fully expanded example above (without environment variables) looks like this curl "https://demo.dataverse.org/api/info/settings/:DatasetPublishPopupCustomText" +.. _show-disclaimer-for-publishing-datasets: + Show Disclaimer for Publishing Datasets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The setting "PublishDatasetDisclaimerText", when set, will prevent a draft dataset from being published through the UI without the user acknowledging the disclaimer. + +.. note:: See :ref:`show-custom-popup-for-publishing-datasets` if the user acknowledgment is not required but you want the message to be displayed in the UI. .. note:: See :ref:`curl-examples-and-environment-variables` if you are unfamiliar with the use of export below. .. code-block:: bash