Skip to content

Customize the "Publishing" disclaimer message. Add support for multi line and links#12223

Open
stevenwinship wants to merge 3 commits intodevelopfrom
521-publishing-disclaimer-support-multiline-enbeded-links
Open

Customize the "Publishing" disclaimer message. Add support for multi line and links#12223
stevenwinship wants to merge 3 commits intodevelopfrom
521-publishing-disclaimer-support-multiline-enbeded-links

Conversation

@stevenwinship
Copy link
Copy Markdown
Contributor

@stevenwinship stevenwinship commented Mar 17, 2026

What this PR does / why we need it: Need to allow the setting :PublishDatasetDisclaimerText to be displayed with line feeds and embedded links

Which issue(s) this PR closes: IQSS/dataverse-pm#521

  • Closes #

Special notes for your reviewer:

Suggestions on how to test this: use
for line feeds and <a href= for links. Maybe check for attacks/ embedded js code. This is an admin call so it shouldn't be an issue.

Example:
curl -sS -X PUT -d 'I agree to the following:
1. My submission has been fully anonymized (required for all humab subject'''s datasets).
2. My submission does not violate any known copyright laws.
3. I understand that I am liable for any and all violations of the Harvard Repository<a href="https://support.dataverse.harvard.edu/harvard-dataverse-general-terms-use">Terms of Use.' "http://localhost:8080/api/admin/settings/:PublishDatasetDisclaimerText"

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
image

Is there a release notes update needed for this change?:

Additional documentation:

@stevenwinship stevenwinship self-assigned this Mar 17, 2026
@stevenwinship stevenwinship moved this to In Progress 💻 in IQSS Dataverse Project Mar 17, 2026
@stevenwinship stevenwinship added this to the 6.11 milestone Mar 17, 2026
@stevenwinship stevenwinship changed the title add support for multi line and links Customize the "Publishing" disclaimer message. Add support for multi line and links Mar 17, 2026
@stevenwinship stevenwinship added the Size: 0.5 A percentage of a sprint. 0.35 hours label Mar 17, 2026
@stevenwinship stevenwinship moved this from In Progress 💻 to Ready for Review ⏩ in IQSS Dataverse Project Mar 17, 2026
@stevenwinship stevenwinship removed their assignment Mar 17, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 19, 2026

Coverage Status

coverage: 24.894%. remained the same — 521-publishing-disclaimer-support-multiline-enbeded-links into develop

@cmbz cmbz added the FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08) label Mar 27, 2026
Copy link
Copy Markdown
Contributor

@scolapasta scolapasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment about parsing - it's not necessary currently, but in case we change this, for example, to be set at the collection level, someday. (and yes, hopefully by then we'd've retired the JSF, so maybe just being extra careful / paranoid.

<ui:fragment rendered="#{valid and settingsWrapper.isHasPublishDatasetDisclaimerText()}">
<div class="form-group">
<p:selectBooleanCheckbox class="text-danger" id="publishDisclaimer"
itemLabel="#{settingsWrapper.getPublishDatasetDisclaimerText()}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is straightforward - and currently installation wide setting, but should we consider neing careful and parsing this through our xhtml parsing to make sure only whitelisted tags get used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you point me to that functionality? I can't find it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This broke the link for Terms of Use so I need to fix that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is an Admin only API and the MarkupChecker removed links I will not be using it.

@scolapasta scolapasta moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Apr 1, 2026
@stevenwinship stevenwinship force-pushed the 521-publishing-disclaimer-support-multiline-enbeded-links branch 2 times, most recently from 100855f to 6cc6c83 Compare April 3, 2026 15:42
@stevenwinship
Copy link
Copy Markdown
Contributor Author

stevenwinship commented Apr 6, 2026

Here is the setting update curl command

curl -sS -X PUT -d 'I agree to the following:<br/>1. My submission has been fully anonymized (required for all human subject'\''s datasets).<br/>2. My submission does not violate any known copyright laws.<br/>3. I understand that I am liable for any and all violations of the Harvard Repository <a href=https://support.dataverse.harvard.edu/harvard-dataverse-general-terms-use>Terms of Use.</a>' http://localhost:8080/api/admin/settings/:PublishDatasetDisclaimerText

@stevenwinship stevenwinship removed their assignment Apr 6, 2026
@stevenwinship stevenwinship force-pushed the 521-publishing-disclaimer-support-multiline-enbeded-links branch from f6caf26 to e98f790 Compare April 6, 2026 19:34
@cmbz cmbz added the FY26 Sprint 21 FY26 Sprint 21 (2026-04-08 - 2026-04-22) label Apr 8, 2026
@stevenwinship stevenwinship force-pushed the 521-publishing-disclaimer-support-multiline-enbeded-links branch from e98f790 to 807d3a3 Compare April 9, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08) FY26 Sprint 21 FY26 Sprint 21 (2026-04-08 - 2026-04-22) Size: 0.5 A percentage of a sprint. 0.35 hours

Projects

Status: In Review 🔎

Development

Successfully merging this pull request may close these issues.

4 participants