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

Support for configurable list of licenses #7920

Merged
merged 228 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from 173 commits
Commits
Show all changes
228 commits
Select commit Hold shift + click to select a range
bc34031
First db table and api.
JingMa87 Mar 16, 2021
5d08b0e
Final changes for prototype.
JingMa87 Mar 16, 2021
f9e3a3e
Add integration tests.
JingMa87 Mar 18, 2021
5e3fb88
Fix indentation.
JingMa87 Mar 22, 2021
0394652
Add prototype of newest changes.
JingMa87 Mar 24, 2021
cb58637
Add URI and URL objects, and new endpoints.
JingMa87 Mar 25, 2021
dda1335
Add Apache icons.
JingMa87 Mar 30, 2021
c87c367
Change tokens to licenses.
JingMa87 Mar 31, 2021
67b7471
Change URIException to IllegalStateException.
JingMa87 Mar 31, 2021
4b6c367
DD-387 Add license entity and api (#57)
JingMa87 Mar 31, 2021
784fdb0
Handle POST request HTTP 409 conflict error and introduce bug fixes.
JingMa87 Mar 31, 2021
8a9974d
Change location to correct URL.
JingMa87 Apr 1, 2021
67178c9
Handle wrong JSON.
JingMa87 Apr 9, 2021
c9d33e2
Handle posting same JSON twice.
JingMa87 Apr 9, 2021
f6c99eb
Reformat tabs.
JingMa87 Apr 9, 2021
878ef6f
Merged back develop
janvanmansum Apr 14, 2021
5bb0142
Merge pull request #70 from janvanmansum/MERGE_BACK_DEVELOP_IN_MULTI_LIC
janvanmansum Apr 14, 2021
855f8a0
Merge pull request #62 from JingMa87/dd-421-wrong-location-header
PaulBoon Apr 21, 2021
41887c5
Merge pull request #67 from JingMa87/DD-424-post-wrong-json
PaulBoon Apr 21, 2021
d3da68b
Merged back develop
janvanmansum Apr 23, 2021
60292bb
Merge branch 'multi-license' into DD-425-missing-error-messages
janvanmansum Apr 23, 2021
5cee794
Merge pull request #66 from JingMa87/DD-425-missing-error-messages
janvanmansum Apr 23, 2021
49f5d0a
Merge branch 'multi-license' into DD-422-posting-same-license-error
JingMa87 Apr 24, 2021
0cf7359
added license info to publish dataset popup dialog
Apr 28, 2021
245f04c
Revert "added license info to publish dataset popup dialog"
Apr 28, 2021
6219010
added license info to publish dataset dialog
Apr 28, 2021
5280a50
Merge remote-tracking branch 'blessed/multi-license' into dd-446-add-…
Apr 28, 2021
f670d73
Merge pull request #61 from JingMa87/DD-422-posting-same-license-error
PaulBoon Apr 28, 2021
13ec753
added extra values to Bundle.properties
Apr 28, 2021
0273c0f
Merge pull request #72 from mderuijter/dd-446-add-license-info-to-pub…
PaulBoon Apr 29, 2021
83b21f0
DD-420 multi license UI (#73)
JingMa87 May 26, 2021
71f6be2
Merged back develop
janvanmansum May 26, 2021
55bd5a1
retrieve active licenses only for dropdown list
May 31, 2021
8f1969c
Merge pull request #78 from mderuijter/filter-inactive-licenses-from-…
janvanmansum Jun 1, 2021
ec4fd30
added function to make sure custom fields are null when saving standa…
Jun 1, 2021
336359d
Merge pull request #80 from mderuijter/dd-484-empty-custom-license-on…
janvanmansum Jun 3, 2021
7dbd78d
Merge branch 'develop' into multi-license
janvanmansum Jun 3, 2021
e28e4e0
refreshes to propper logo&url on item select
Jun 7, 2021
832e4f6
refactored render statement
Jun 7, 2021
b1fb21f
Merge pull request #81 from mderuijter/dd-485-update-license-logo-and…
PaulBoon Jun 8, 2021
74cd21b
Create V5.5.0.3__7440-multi-license-add-column-to-termsofuseandaccess…
Jun 8, 2021
9ad49e8
newline at end of file
Jun 8, 2021
7d5c0d1
WIP
janvanmansum Jun 9, 2021
7676ab5
Reverted attempt to move uniqueness check to database
janvanmansum Jun 9, 2021
8915c06
Started with docs
janvanmansum Jun 11, 2021
17616c4
Docs in progress
janvanmansum Jun 12, 2021
918c86f
Tabs -> spaces
janvanmansum Jun 12, 2021
8cc996a
Documented management API
janvanmansum Jun 12, 2021
ec37254
Merge pull request #85 from janvanmansum/CLEANUP_LICENSE_API
janvanmansum Jun 12, 2021
2ecba09
Removed shortDescription from integration test files.
janvanmansum Jun 12, 2021
58b623e
Merge pull request #82 from mderuijter/dd-486-termsofuseandaccess-fly…
janvanmansum Jun 16, 2021
5b68e53
DD-511 Open links to license in new tab
janvanmansum Jun 17, 2021
a980c5e
Merge pull request #90 from janvanmansum/multi-license
janvanmansum Jun 18, 2021
c34bd3e
DD-513. Added database setting :AllowCustomTerms (#91)
janvanmansum Jun 18, 2021
6313887
DD-513 Added docs for new setting.
janvanmansum Jun 18, 2021
5c72dca
Replaced redundant (and incomplete) uniqueness check with try-cath ar…
janvanmansum Jun 19, 2021
9895ddd
Merge pull request #92 from janvanmansum/REFACTOR_LICENSE_UNIQUENESS
janvanmansum Jun 19, 2021
1b8765e
Removed remaining references to shortDescription property + renamed f…
janvanmansum Jun 19, 2021
d9e61a5
WIP
janvanmansum Jun 19, 2021
e45b74c
Merge pull request #93 from janvanmansum/ADD_CC0_VIA_FLYWAY
janvanmansum Jun 19, 2021
1a9fe2e
DD-515. Don't allow a referenced license to be deleted through the co…
janvanmansum Jun 21, 2021
6516186
DD-521 Default license (#95)
janvanmansum Jun 28, 2021
2497228
Merged back develop
janvanmansum Jun 30, 2021
1e1e0f6
Renumbered flyway script to avoid conflict with other flyway script
janvanmansum Jun 30, 2021
6840329
added license shortDescription, and UI shortDescription to publish di…
mderuijter Jun 30, 2021
fab2f99
DD-527 Restructure license and custom terms in dataset JSON (#97)
mderuijter Jul 8, 2021
20e4360
DD-526 create url for custom terms (#99)
mderuijter Jul 8, 2021
0dc8e80
added EditMode check to setLicense
Jul 9, 2021
0a187ee
updated flyway script
Jul 13, 2021
5b952b1
Merge pull request #100 from mderuijter/dd-548-defaults-to-custom-bugfix
janvanmansum Jul 14, 2021
d425ec7
Merge pull request #102 from mderuijter/dd-522-update-termsofuseandac…
janvanmansum Jul 14, 2021
4c12a7e
changed bundle property file.dataFilesTab.terms.list.termsOfUse.waive…
Jul 14, 2021
c2e7375
Merge pull request #104 from mderuijter/dd-533-improve-ui-text-licens…
janvanmansum Jul 14, 2021
fd21968
DD-526 create url for custom terms (#103)
mderuijter Jul 14, 2021
4518fd6
DD-525 add short description (#101)
mderuijter Jul 14, 2021
19f3eac
Merge back develop (#105)
janvanmansum Jul 14, 2021
7df29a1
DD-528 Adapt metadata export to show new license info (#106)
mderuijter Jul 24, 2021
f8270de
DD-553 Default licenses can be deleted (#107)
mderuijter Jul 24, 2021
6cc86e0
Resolved merge conflicts
janvanmansum Jul 24, 2021
352e6b4
Renumbered flyway scripts + removed duplicate
janvanmansum Jul 24, 2021
a5e0125
Updated example config
janvanmansum Jul 24, 2021
046df42
Decrease diff
janvanmansum Jul 24, 2021
f93e45f
Decrease diff
janvanmansum Jul 24, 2021
56c12c4
Decrease diff
janvanmansum Jul 24, 2021
924e166
Decrease diff
janvanmansum Jul 24, 2021
e499435
Updated example files in scripts/api/data
janvanmansum Jul 24, 2021
417b875
Decreased import diffs
janvanmansum Jul 24, 2021
0dd15b0
Removed one ctor from ConflictException
janvanmansum Jul 24, 2021
46f675e
urlIcon element does not disploy if empty now
Jul 27, 2021
9223a3e
added api call GET /licenses/default
Jul 28, 2021
9f58548
removed termsofuseandacces.license column
Aug 16, 2021
31d7470
Merge pull request #112 from mderuijter/dd-562-implement-GET-api-admi…
janvanmansum Sep 10, 2021
925a1c3
DD-573 Implement set license in semantic api (#113)
mderuijter Sep 10, 2021
556be4a
Merge pull request #114 from mderuijter/dd-549-removed-termsofuseanda…
janvanmansum Sep 10, 2021
051f75d
Merge pull request #110 from mderuijter/dd-552-remove-reference-to-wa…
janvanmansum Sep 10, 2021
b001bf1
Merged back develop
janvanmansum Sep 10, 2021
47cabe1
Renum flyway script
janvanmansum Sep 10, 2021
60cb2ea
DD-561 Updated SwordServiceBean to support multi-license (#118)
mderuijter Sep 15, 2021
06c8574
DD-593 integration test fixes multi license (#116)
mderuijter Sep 15, 2021
9192f35
Merged back develop
janvanmansum Sep 15, 2021
6a708fc
Restored github unit test workflow
janvanmansum Sep 15, 2021
741f255
Merge branch 'develop' into multi-license
janvanmansum Sep 24, 2021
6ad3bc3
DD-529. Fixes in setting of TermsOfUseAndAccess properties in JSONLDU…
janvanmansum Oct 5, 2021
a421aba
Merge pull request #125 from janvanmansum/DD-529
janvanmansum Oct 6, 2021
5151b94
implementing change requests
Oct 6, 2021
896c02a
Merge remote-tracking branch 'blessed/multi-license' into multi-license
Oct 6, 2021
fae7475
implemented change requests
Oct 6, 2021
cea9c17
Merge remote-tracking branch 'upstream/develop' into dd-617-change-re…
Oct 6, 2021
e21ee3b
fix flyway numbering
qqmyers Oct 6, 2021
9840eb3
Merge branch 'develop' into multi-license
janvanmansum Oct 7, 2021
83e8dfe
Merge remote-tracking branch 'blessed/multi-license' into multi-license
janvanmansum Oct 7, 2021
1002e87
Merge remote-tracking branch 'blessed/multi-license' into dd-617-chan…
Oct 7, 2021
7cafa70
simplified multi-license code for OpenAIRE export
Oct 7, 2021
9cb9518
Merge pull request #127 from GlobalDataverseCommunityConsortium/multi…
janvanmansum Oct 8, 2021
ef2e276
Merge pull request #126 from mderuijter/dd-617-change-requests-multi-…
janvanmansum Oct 8, 2021
d2c61b3
Merged back develop
janvanmansum Oct 22, 2021
6159d19
DD-648 fix for allow custom terms (#130)
mderuijter Oct 26, 2021
91a5fab
update flyway numbering
qqmyers Oct 26, 2021
e55b12e
Merge pull request #132 from GlobalDataverseCommunityConsortium/multi…
janvanmansum Oct 27, 2021
4cbaa01
also need to handle new install where license column doesn't exist
qqmyers Oct 27, 2021
f5ee336
Merge pull request #133 from GlobalDataverseCommunityConsortium/multi…
janvanmansum Oct 28, 2021
a55304c
DD-647 fixed/refactored exception handling (#131)
mderuijter Oct 28, 2021
ff5fcaf
refactored code
Oct 28, 2021
97ff410
Merge pull request #134 from mderuijter/dd-681-refactoring-code
janvanmansum Oct 28, 2021
1c4ee43
DD-683 UI Change Requests Multi License (#135)
mderuijter Nov 2, 2021
f994923
Merged back develop
janvanmansum Nov 9, 2021
1d575bd
Resolved conflict
janvanmansum Nov 9, 2021
a79143e
Merge branch 'develop' into multi-license
janvanmansum Nov 15, 2021
b87e19a
Merge branch 'develop' into multi-license
janvanmansum Nov 22, 2021
c9bf631
rst formatting
janvanmansum Nov 22, 2021
150a393
Renumbered Flyway script
janvanmansum Nov 22, 2021
1a7def0
Initial attempt to make terms required with custom license
PaulBoon Nov 23, 2021
de506ee
Merge branch 'multi-license' of github.com:DANS-KNAW/dataverse into D…
PaulBoon Nov 23, 2021
19f9edf
Added validator to TermsOfUse
PaulBoon Nov 25, 2021
73e6fc8
Merge branch 'develop' into multi-license
janvanmansum Nov 29, 2021
1065610
Merge branch 'develop' into multi-license
janvanmansum Dec 5, 2021
727c997
Renumbered flyway script
janvanmansum Dec 5, 2021
76a12d1
Required termsOfUse, but form is not correctly updated
PaulBoon Dec 8, 2021
0618c14
Merge branch 'develop' into multi-license
janvanmansum Dec 12, 2021
1f81a45
Renumbered flyway script
janvanmansum Dec 12, 2021
9cf8e6d
Merge remote-tracking branch 'IQSS/develop' into PB/DD-696
qqmyers Dec 14, 2021
5045950
merge latest flyway numbering changes
qqmyers Dec 15, 2021
3d70aeb
cleanup/merge
qqmyers Dec 15, 2021
525add2
fix for DD-696
qqmyers Dec 15, 2021
a4eb99e
updating string names/values
qqmyers Dec 15, 2021
af8cba7
move license name/uri code
qqmyers Dec 15, 2021
dea8f13
add custom license URI to dataset
qqmyers Dec 15, 2021
2be06ef
custom link on dataset page
qqmyers Dec 16, 2021
0fc0124
Language tweak
qqmyers Dec 16, 2021
59c4b25
cleanup
qqmyers Dec 16, 2021
d04cfce
switch to using License objects directly in select menu
qqmyers Dec 16, 2021
019dd94
use param - set license directly on terms class
qqmyers Dec 16, 2021
2438185
get license selections from service, add caching, clear in terms
qqmyers Dec 16, 2021
e1be751
remove unused method
qqmyers Dec 16, 2021
3da511a
Update release notes and flyway to reflect all cases
qqmyers Dec 17, 2021
9c15773
Merge branch 'develop' into multi-license
janvanmansum Dec 20, 2021
c8b4ef7
Copied @qqmyers version of flyway script over latest one
janvanmansum Dec 20, 2021
a213ab4
Typos an layout
janvanmansum Dec 20, 2021
119eca8
Fix doc generation error
janvanmansum Dec 20, 2021
f838f74
Fix error response/tests
qqmyers Jan 3, 2022
5a582f3
Merge pull request #137 from GlobalDataverseCommunityConsortium/multi…
janvanmansum Jan 4, 2022
61e327e
Merge branch 'develop' into multi-license
janvanmansum Jan 4, 2022
0cfe058
Merge remote-tracking branch 'blessed/multi-license' into multi-license
janvanmansum Jan 4, 2022
529c5d0
remove obsolete tests
qqmyers Jan 5, 2022
1c50160
Merge pull request #138 from GlobalDataverseCommunityConsortium/multi…
janvanmansum Jan 5, 2022
9a4fa8d
Merge remote-tracking branch 'IQSS/develop' into DANS/multi-license
qqmyers Jan 5, 2022
b6c2d80
potential fix for the build error
qqmyers Jan 5, 2022
842f0a8
Merge pull request #139 from GlobalDataverseCommunityConsortium/multi…
janvanmansum Jan 5, 2022
4bbd51a
Merged back develop
janvanmansum Jan 6, 2022
b1880cb
Merge remote-tracking branch 'blessed/multi-license' into multi-license
janvanmansum Jan 6, 2022
dbdc031
Update doc/release-notes/7440-multilicense.md
janvanmansum Jan 7, 2022
e83e3d7
Update doc/release-notes/7440-multilicense.md
janvanmansum Jan 7, 2022
2ed5680
Update doc/release-notes/7440-multilicense.md
janvanmansum Jan 7, 2022
3d26262
update license api and tests
qqmyers Jan 10, 2022
c10530c
refactor to add license package
qqmyers Jan 10, 2022
b6d170b
fix/simplify refactor
qqmyers Jan 10, 2022
513c011
update docs
qqmyers Jan 11, 2022
2fac0e8
remove unused query
qqmyers Jan 11, 2022
02a04bd
add braces for ifs, fix text
qqmyers Jan 11, 2022
27a607f
use Bundle.properties term for license.custom
qqmyers Jan 11, 2022
a6687a0
print termsofuse when custom, simplify logic re: nulls
qqmyers Jan 11, 2022
663bde9
braces for if, reformat method
qqmyers Jan 11, 2022
a183b4a
add comments re: URI logic
qqmyers Jan 11, 2022
3e897e8
note compatibility issues
qqmyers Jan 11, 2022
632b71d
add isDefault key in license json output
qqmyers Jan 11, 2022
5ef1972
note UI enhancements to raise profile of license/terms
qqmyers Jan 11, 2022
dc08712
update datasetversion jsonld output and tests
qqmyers Jan 11, 2022
7bcfa0e
add suite of CC licenses for future installer use
qqmyers Jan 11, 2022
9131e96
update license name, use 'name' instead of 'label' in exports
qqmyers Jan 11, 2022
e8c9fc9
only print custom terms fields with no license
qqmyers Jan 11, 2022
5cf2bd4
restore termsofuse with no license inc. check for URL
qqmyers Jan 11, 2022
8f2624b
fix auto-change
qqmyers Jan 11, 2022
1e2e83b
reformat
qqmyers Jan 11, 2022
76a789b
typo/extra chars
qqmyers Jan 11, 2022
1c79279
Merge pull request #140 from GlobalDataverseCommunityConsortium/multi…
janvanmansum Jan 12, 2022
aee5d76
merged back develop
janvanmansum Jan 13, 2022
fb60c1f
fix json lincese object and typo
qqmyers Jan 13, 2022
5623537
fix respecting custom terms property
qqmyers Jan 13, 2022
7bdf6b6
typo
qqmyers Jan 14, 2022
5d1b8e1
fix logic re: when to show download dialog
qqmyers Jan 14, 2022
dad5fc8
unreachable code
qqmyers Jan 14, 2022
91fba7c
add terms to download popup
qqmyers Jan 14, 2022
eeab710
css for download popup
qqmyers Jan 14, 2022
0b667be
make showing tofa for restricted files context sensitive
qqmyers Jan 14, 2022
b097628
fix context mgmt for downloads
qqmyers Jan 14, 2022
3d71fc9
Merge remote-tracking branch 'IQSS/develop' into DANS/multi-license
qqmyers Jan 14, 2022
a85765d
Merge pull request #141 from GlobalDataverseCommunityConsortium/multi…
janvanmansum Jan 15, 2022
304371c
Solved NPE when datasetVersion.getTermsOfUseAndAccess().getTermsOfUse…
janvanmansum Jan 15, 2022
e4e9f0e
Merge branch 'develop' into multi-license
janvanmansum Jan 21, 2022
ec3965e
per review - text updates update formatting of pub dialog
qqmyers Jan 21, 2022
4175f4b
include info text and tweak spacing
qqmyers Jan 21, 2022
075d55b
tweak text
qqmyers Jan 21, 2022
d4ef070
align terms tab display (w/o link though)
qqmyers Jan 21, 2022
fb309dd
Merge remote-tracking branch 'DANS/multi-license' into DANS/multi-lic…
qqmyers Jan 21, 2022
860b08f
Merge pull request #142 from GlobalDataverseCommunityConsortium/multi…
janvanmansum Jan 24, 2022
4433533
fix NPE in DC export
qqmyers Jan 26, 2022
7a176a5
Merge remote-tracking branch 'DANS/multi-license' into DANS/multi-lic…
qqmyers Jan 26, 2022
9526963
Merge remote-tracking branch 'IQSS/develop' into DANS/multi-license
qqmyers Jan 26, 2022
4665ac7
fix formatting issue found in QA
qqmyers Jan 26, 2022
54bf74c
Merge pull request #143 from GlobalDataverseCommunityConsortium/DANS/…
janvanmansum Jan 27, 2022
7721ca9
format fixes
qqmyers Jan 27, 2022
55f7d0d
Merge branch 'develop' into multi-license
janvanmansum Jan 28, 2022
334bb48
Merge remote-tracking branch 'blessed/multi-license' into multi-license
janvanmansum Jan 28, 2022
20b3142
Merge pull request #144 from GlobalDataverseCommunityConsortium/multi…
janvanmansum Jan 28, 2022
667c1b0
per QA request - note can't roll back without db rollback
qqmyers Jan 28, 2022
148fbcd
curl example updates/fixes per QA
qqmyers Jan 28, 2022
fd8946c
per QA - fix issue with custom text showing with standard licenses
qqmyers Jan 28, 2022
e6d449a
Merge pull request #145 from GlobalDataverseCommunityConsortium/multi…
janvanmansum Jan 31, 2022
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
119 changes: 119 additions & 0 deletions doc/release-notes/7440-multilicense.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
### Multiple License Support

Users can now select from a set of configured licenses in addition to or instead of the current Creative Commons CC0 choice or provide custom terms of use (if configured) for their datasets. Administrators can configure their Dataverse instance via API to allow any desired license as a choice and can enable/disable the option to allow custom terms. Administrators can also mark licenses as 'inactive' to disallow future use while keeping that license for existing datasets. By default, only the CC0 license will be preinstalled. Examples in the Guides show how to add additional licenses and specific examples are given for several Creative Commons licenses. **Note: Datasets in existing installations will automatically be updated to conform to new requirements that custom terms cannot be used with a standard license and that custom terms cannot be empty. Administrators may wish to manually update datasets with these conditions if they do not like the automated migration choices. See the Notes for Dataverse Installation Administrators and Additional Release Steps sections for further information.**
Copy link
Member

Choose a reason for hiding this comment

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

I'm glad this says "By default, only the CC0 license will be preinstalled" because I found it surprising when I deployed the code first and looked at this release note later. For a new installation of Dataverse, should we have several popular Creative Commons licenses already enabled?

Copy link
Member

Choose a reason for hiding this comment

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

We didn't want to add for existing installations since that's a policy change, but having more (e.g. the basic CC choices) for new installations could make sense, although I'm not sure - even then admins may want to review before allowing anything beyond fully public/CC0.

(I'm also not sure how best to do it - would it be a change in the installer to call the API after Dataverse is running? Or is there a better way? (Can the mechanism that autocreates tables for new installs also add rows (and not affect existing tables?). Ansible? (It might be nice to preconfigure with the standard GDCC previewers too - another set of API calls that could/should only run on new installs))

In any case, if there's consensus on changes we can do that here or as part of a new issue/PR.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, exactly. If we want the product to ship with half a dozen CC licenses, we'd create the JSON files and have the installer create each license. This would be for new installations.

For existing installations, we'd just say in the release note that new licenses are possible and probably point out the JSON files that new installations wlll have loaded if they want to have the same licenses as out of the box Dataverse. I don't think we should populate existing installations with licenses. Let them opt in.

Obviously, yes, this could all be done after this pull request is merged in a new pull request, but I thought I'd raise it now. Otherwise, it feels like a bit of a hidden feature that installations can have a nice dropdown of popular licenses.



## Major Use Cases and Infrastructure Enhancements


- When creating/updating datasets, users can select from a set of standard licenses configured by the administrator or provide custom terms (if the installation is configured to allow them).

## Notes for Dataverse Installation Administrators

### Updating for multiple license support

As part of installing/upgrading an existing installation, administrators may wish to add additional license choices and/or configure Dataverse to allow custom terms. Adding additional licenses is managed via API. Licenses are described via a JSON structure providing a name, URL, short description, and optional icon URL. Additionally licenses may be marked as active (selectable for new/updated datasets) or inactive (only allowed on existing datasets) and one license can be marked as the default. Custom Terms are allowed by default (backward compatible with the current option to select 'No' to using CC0) and can be disabled by setting `:AllowCustomTermsOfUse` to false.

Further, administrators should review the following automated migration of existing licenses and terms into the new license framework and, if desired, should manually find and update any datasets for which the automated update is problematic.
To understand the migration process, it is useful to understand how the multiple license feature works in this release:

'Custom Terms', aka a custom license, are defined through entries in the following fields of the dataset "Terms" tab:
- Terms of Use
- Confidentiality Declaration
- Special Permissions
- Restrictions
- Citation Requirements
- Depositor Requirements
- Conditions
- Disclaimer

'Custom Terms' require, at a minimum, a non-blank entry in the "Terms of Use" field. Entries in other fields are optional.

Since these fields are intended for terms/conditions that would potentially conflict with or modify the terms in a standard license, they are no longer shown when a standard license is selected.

In earlier Dataverse releases, it was possible to select the CC0 license and have entries in the fields above. It was also possible to say 'No' to using CC0 and leave all of these terms fields blank.

The automated process will update existing datasets as follows.

- 'CC0 Waiver' and no entries in the fields above -> CC0 License (no change)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- 'CC0 Waiver' and no entries in the fields above -> CC0 License (no change)
- 'CC0 Waiver' and no entries in the fields above -> CC0 Waiver (no change)

In the past we've made emphasized that CC0 is a waiver rather license. I assume we want to continue doing this.

Copy link
Member

Choose a reason for hiding this comment

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

This is a tricky one. I think Waiver made sense when the only alternative was to add custom terms/not accept the waiver, but now with the overall option being 'Licenses' having one of them labelled as a Waiver may be more confusing than it is worth.

There are more comments about naming below, but I'll note here that the intent was not to replace screen text 'CC0 Waiver' with 'CC0 License' - it would just be 'CC0' as the value where the License/DUA choice is shown (DUA == data user agreement). Nominally the important connection for a license is the URL since that gets you to the text of the license, so the name could potentially be non-standard, i.e. it could be 'CC0 Waiver' if we wanted that as a default or if individual sites wanted more backward compatibility. (Not sure if one would then add 'CC-By License' instead of 'CC-By' etc.)

I think where the code is now is trying to use the standard community name (perhaps confused with identifier still in some places - more below), which would presumably be used if/when licenses get tied to an external service and/or if internationalization is added.

- No CC0 Waiver and an entry in the Terms of Use field and possibly others fields listed above -> 'Custom Terms' with the same entries in these fields (no change)

- CC0 Waiver and an entry in some of the fields listed -> 'Custom Terms' with the following text preprended in the "Terms of Use" field: "This dataset is made available under a Creative Commons CC0 license with the following additional/modified terms and conditions:"
Copy link
Member

Choose a reason for hiding this comment

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

Installations that enter metadata in non-English language may not like this. I can imagine a mix of English at the top (prepended) and French below. I guess they can do a SQL query for datasets that were modified in this way and replace the English with French.

Copy link
Member

Choose a reason for hiding this comment

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

Yes. I'm not sure that anyone will think that is a good default, but we added something just so that a naïve update won't lose info or result in an invalid/legacy case where a dataset now has a CC0 license and custom terms - something you can't create with the new UI.

(Not sure if it has been said explicitly anywhere yet but in the design and review of this feature, the idea that one should not be able to add terms of use (the specific termsOfUse field and others that also present a way to modify/counter license terms) was agreed to, as was the idea that having a custom license and a blank/empty terms of use field (essentially having no terms at all) should no longer be allowed. These have created the question about how to handle legacy datasets that violate those restrictions. From looking at Harvard and some other sites, it seems like these cases should be rare, so the idea of providing queries/a process for finding and fixing them prior to upgrading (could be done way before upgrading too) and then providing some default that would catch any remaining cases in a way that works technically and arguably doesn't change the meaning, seems like an acceptable approach. FWIW: to help clarify things for the community, I was also hoping to do a recorded segment in a community meeting that would show off the new multi-license feature and explain what would happen to existing data/how to avoid the default upgrades if desired.))

Copy link
Member

Choose a reason for hiding this comment

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

Sure, I definitely think showing off the new feature during a community call would be interesting and helpful.

Makes sense what you're saying about converting invalid/legacy cases to valid ones.

- No CC0 Waiver and an entry in a field(s) other than the Terms of Use field -> 'Custom Terms' with the following "Terms of Use" added: "This dataset is made available with limited information on how it can be used. You may wish to communicate with the Contact(s) specified before use."
- No CC0 Waiver and no entry in any of the listed fields -> 'Custom Terms' with the following "Terms of Use" added: "This dataset is made available without information on how it can be used. You should communicate with the Contact(s) specified before use."

Administrators who have datasets where CC0 has been selected along with additional terms, or datasets where the Terms of Use field is empty, may wish to modify those datasets prior to upgrading to avoid the automated changes above. The Additonal Release Steps provides information on how to find and modify any such datasets.

## New JVM Options and DB Settings

- `:AllowCustomTermsOfUse` (default: true) allow users to provide Custom Terms instead of choosing one of the configured standard licenses.

See the [Database Settings](https://guides.dataverse.org/en/5.10/installation/config.html) section of the Guides for more information.

## Additional Release Steps

In most Dataverse installations, one would expect the vast majority of Datasets to either use the CC0 Waiver or have non-empty Terms of Use. As noted above, these will be migrated without any issue. Administrators may however wish to find and manually update datasets that specified a CC0 license but also had terms (no longer allowed) or had no license and no terms of use (also no longer allowed) rather than accept the default migrations for these datasets listed above.

### To find Datasets with a CC0 license and non-empty terms:

select CONCAT('doi:', dvo.authority, '/', dvo.identifier), v.alias as dataverse_alias, case when versionstate='RELEASED' then concat(dv.versionnumber, '.', dv.minorversionnumber) else versionstate END as version, dv.id as datasetversion_id, t.id as termsofuseandaccess_id, t.termsofuse, t.confidentialitydeclaration, t.specialpermissions, t.restrictions, t.citationrequirements, t.depositorrequirements, t.conditions, t.disclaimer from dvobject dvo, termsofuseandaccess t, datasetversion dv, dataverse v where dv.dataset_id=dvo.id and dv.termsofuseandaccess_id=t.id and dvo.owner_id=v.id and t.license='CC0' and not (t.termsofuse is null and t.confidentialitydeclaration is null and t.specialpermissions is null and t.restrictions is null and citationrequirements is null and t.depositorrequirements is null and t.conditions is null and t.disclaimer is null);

The datasetdoi column will let you find/view the affected dataset in the Dataverse web interface. The version column will indicate which version(s) are relevant. The dataverse_alias will tell you which Dataverse collection the dataset is in (and may be useful if you want to adjust all datasets in a given collection). The termsofuseandaccess_id column indicates which specific entry in that table is associated with the dataset/version. The remaining columns show the values of any terms fields.

There are two choices to migrate such datasets:

- Set all terms fields to null:


update termsofuseandaccess set termsofuse=null, confidentialitydeclaration=null, t.specialpermissions=null, t.restrictions=null, citationrequirements=null, depositorrequirements=null, conditions=null, disclaimer=null where id=<id>;

or to change several at once:

update termsofuseandaccess set termsofuse=null, confidentialitydeclaration=null, t.specialpermissions=null, t.restrictions=null, citationrequirements=null, depositorrequirements=null, conditions=null, disclaimer=null where id in (<comma separated list of termsanduseofaccess_ids>);

- Alternately, change the Dataset version(s) to not use the CCO waiver and modify the Terms of Use (and/or other fields) as you wish to indicate that the CC0 waiver was previously selected:


update termsofuseandaccess set license='NONE', termsofuse=concat('New text. ', termsofuse) where id=<id>;

or

update termsofuseandaccess set license='NONE', termsofuse=concat('New text. ', termsofuse) where id in (<comma separated list of termsanduseofaccess_ids>);

### To find datasets without CC0 and having an empty Terms of Use field:

select CONCAT('doi:', dvo.authority, '/', dvo.identifier), v.alias as dataverse_alias, case when versionstate='RELEASED' then concat(dv.versionnumber, '.', dv.minorversionnumber) else versionstate END as version, dv.id as datasetversion_id, t.id as termsofuseandaccess_id, t.termsofuse, t.confidentialitydeclaration, t.specialpermissions, t.restrictions, t.citationrequirements, t.depositorrequirements, t.conditions, t.disclaimer from dvobject dvo, termsofuseandaccess t, datasetversion dv, dataverse v where dv.dataset_id=dvo.id and dv.termsofuseandaccess_id=t.id and dvo.owner_id=v.id and t.license='NONE' and t.termsofuse is null;

These datasets could be updated to use CC0:

update termsofuseandaccess set license='CC0', confidentialitydeclaration=null, t.specialpermissions=null, t.restrictions=null, citationrequirements=null, depositorrequirements=null, conditions=null, disclaimer=null where id=<id>;

or Terms of Use could be added:

update termsofuseandaccess set termsofuse='New text. ' where id=<id>;

In both cases, the same where id in (`<comma separated list of termsanduseofaccess_ids>`); ending could be used to change multiple datasets/versions at once.

### Standardizing Custom Licenses:

If many datasets use the same set of Custom Terms, it may make sense to create and register a standard license including those terms. Doing this would include:
- Creating and posting an external document that includes the custom terms, i.e. an HTML document with sections corresponding to the terms fields that are used.
- Defining a name, short description, URL (where it is posted), and optionally an icon URL for this license
- Using the Dataverse API to register the new license as one of the options available in your installation
- Using the API to make sure the license is active and deciding whether the license should also be the default
- Once the license is registered with Dataverse, making an SQL update to change datasets/versions using that license to reference it instead of having their own copy of those custom terms.

The benefits of this approach are:
- usability: the license can be selected for new datasets without allowing custom terms and without users having to cut/paste terms or collection administrators having to configure templates with those terms
- efficiency: custom terms are stored per dataset whereas licenses are registered once and all uses of it refer to the same object and external URL
- security: with the license terms maintained external to Dataverse, users cannot edit specific terms and curators do not need to check for edits
Comment on lines +97 to +109
Copy link
Member

Choose a reason for hiding this comment

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

I love this write up of the benefits of custom licenses and how to create them but I'm afraid it'll get lost in a one time release note. Should we copy this into the guides?

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good. I'll look for a spot.


Once a standardized version of you Custom Terms are registered as a license, an SQL update like the following can be used to have datasets use it:

UPDATE termsofuseandaccess
SET license_id = (SELECT license.id FROM license WHERE license.name = '<Your License Name>'), termsofuse=null, confidentialitydeclaration=null, t.specialpermissions=null, t.restrictions=null, citationrequirements=null, depositorrequirements=null, conditions=null, disclaimer=null
WHERE termsofuseandaccess.termsofuse LIKE '%<Unique phrase in your Terms of Use>%';



select CONCAT('doi:', dvo.authority, '/', dvo.identifier), v.alias as dataverse_alias, case when versionstate='RELEASED' then concat(dv.versionnumber, '.', dv.minorversionnumber) else versionstate END as version, dv.id as datasetversion_id, t.id as termsofuseandaccess_id, t.termsofuse, t.confidentialitydeclaration, t.specialpermissions, t.restrictions, t.citationrequirements, t.depositorrequirements, t.conditions, t.disclaimer from dvobject dvo, termsofuseandaccess t, datasetversion dv, dataverse v where dv.dataset_id=dvo.id and dv.termsofuseandaccess_id=t.id and dvo.owner_id=v.id and t.license_id=1 and not (t.termsofuse is null and t.confidentialitydeclaration is null and t.specialpermissions is null and t.restrictions is null and citationrequirements is null and t.depositorrequirements is null and t.conditions is null and t.disclaimer is null);
7 changes: 7 additions & 0 deletions doc/sphinx-guides/source/_static/api/add-license.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "CC-BY-4.0",
Copy link
Member

@pdurbin pdurbin Jan 6, 2022

Choose a reason for hiding this comment

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

Should this be "CC BY 4.0" (without the hyphens)? That's what it says at https://creativecommons.org/licenses/by/4.0/

Screen Shot 2022-01-06 at 11 59 21 AM

Update: I talked to @4tikhonov and he pointed me to https://spdx.org/licenses/ which leads me to believe that "name" should be "identifer" since "CC-BY-4.0" seems to be an identifier.

However, now I'm concerned that we're showing these machine-readable identifiers in the UI. If I saw "MIT-0" in the GUI below I wouldn't know what it means but "MIT No Attribution" is clear.

126765490-7d91ed79-65c5-411c-81d2-b6d1bdabe021

Copy link
Member

Choose a reason for hiding this comment

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

I think the URL is really the primary identifier and the 'name' is intended for display rather than as a second less specific way to identify the license globally. So - I think I agree that the non-hyphenated versions make more sense and we can change those (unless someone else has a concern about that?).

(Note - since these are configured via API, installations that prefer some other user-visible label (or want to have them in another language, etc.), they can still do that. The interoperability is intended to be by URL - if that matches, it's the same license.

Copy link
Member

Choose a reason for hiding this comment

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

I have no objection to using a URL as a primary identifier but are our URLs aligned with SPDX, for example? It seems like not (CC-BY-4.0 example):

In short, if we're going to use URLs as identifiers it would be nice to see a canonical list of these URLs somewhere.

Copy link
Member

Choose a reason for hiding this comment

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

The URLs used now are what Creative Commons has assigned to their licenses. Their page metadata include attributes like about="http://creativecommons.org/licenses/by/4.0" for example. While SPDX has assigned alternate URLs, I don't think it would be best practice to not follow Creative Commons. Since licenses are configurable, installations could choose to do that if they wanted to though.

"uri": "http://creativecommons.org/licenses/by/4.0",
"shortDescription": "Creative Commons Attribution 4.0 International License.",
"iconUrl": "https://i.creativecommons.org/l/by/4.0/88x31.png",
"active": true
}
25 changes: 25 additions & 0 deletions doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3717,3 +3717,28 @@ Recursively applies the role assignments of the specified Dataverse collection,
GET http://$SERVER/api/admin/dataverse/{dataverse alias}/addRoleAssignmentsToChildren

Note: setting ``:InheritParentRoleAssignments`` will automatically trigger inheritance of the parent Dataverse collection's role assignments for a newly created Dataverse collection. Hence this API call is intended as a way to update existing child Dataverse collections or to update children after a change in role assignments has been made on a parent Dataverse collection.

Copy link
Member

Choose a reason for hiding this comment

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

This is a geneal comment about updates to the guides. We should probably update the "Terms" section in the User Guide from what's currently there: https://guides.dataverse.org/en/5.9/user/dataset-management.html#terms

Copy link
Member

Choose a reason for hiding this comment

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

Good catch - will do.


Manage Available Standard License Terms
Copy link
Member

Choose a reason for hiding this comment

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

We might want to move these outside "admin" so regular API users can learn what licenses are available.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense - for the get licenses call anyway. Probably good if API users can directly tell if custom licenses are allowed too. Is there a precedent for a split API like that where get is open and the change/delete functionality is restricted? (Looking at how to construct the URLs and where to place the code - I know there are some /api/admin/* calls not in the Admin class, but I don't know what best practice is.)

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we should have a new top level /api/licenses. The main thing is to have it outside of /api/admin which is usually blocked in production. I did something similar with /api/pids.

That way, any API client could get a list of licenses even without authenticating. But only superusers would be able to add licenses.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View the list of standard license terms that can be selected for a dataset::

curl http://$SERVER/api/admin/licenses

View the details of the standard license with the database ID specified in ``$ID``::

export ID=1
curl http://$SERVER/api/admin/licenses/$ID

Add a new license by posting a JSON file adapted from this example :download:`add-license.json <../_static/api/add-license.json>`. The ``name`` and ``uri`` of the new license must be unique. ::

curl -X POST -H 'Content-Type: application/json' --data-binary @add-license.json http://$SERVER/api/admin/licenses

Overwrite the license with the database specified in ``$ID``::

curl -X PUT -H 'Content-Type: application/json' --data-binary @edit-license.json http://$SERVER/api/admin/licenses/$ID

Delete the license with with the database specified in ``$ID``::

curl -X DELETE http://$SERVER/api/admin/licenses/$ID
Loading