From dec185cd5dd99e0650bff0cb9bb68c59a063b458 Mon Sep 17 00:00:00 2001 From: darms Date: Fri, 23 Feb 2024 14:00:14 +0100 Subject: [PATCH] fix(k8s.dataverse): Ensures that the licence are created during setup and custom terms are not allowed. --- k8s/dataverse/Chart.yaml | 2 +- k8s/dataverse/persona/nfdi4health/init.sh | 3 +++ .../nfdi4health/licence/license-All-rights-reserved.json | 2 +- .../{licenseCC-BY-4.0.json => license-CC-BY-4.0.json} | 0 ...licenseCC-BY-NC-4.0.json => license-CC-BY-NC-4.0.json} | 2 +- ...eCC-BY-NC-SA-4.0.json => license-CC-BY-NC-SA-4.0.json} | 0 ...licenseCC-BY-SA-4.0.json => license-CC-BY-SA-4.0.json} | 0 .../licence/{licenseCC0-1.0.json => license-CC0-1.0.json} | 2 +- .../nfdi4health/licence/license-Not-applicable.json | 2 +- .../persona/nfdi4health/licence/license-Not-assigned.json | 8 ++++++++ .../persona/nfdi4health/licence/license-Unknown.json | 2 +- 11 files changed, 17 insertions(+), 6 deletions(-) rename k8s/dataverse/persona/nfdi4health/licence/{licenseCC-BY-4.0.json => license-CC-BY-4.0.json} (100%) rename k8s/dataverse/persona/nfdi4health/licence/{licenseCC-BY-NC-4.0.json => license-CC-BY-NC-4.0.json} (94%) rename k8s/dataverse/persona/nfdi4health/licence/{licenseCC-BY-NC-SA-4.0.json => license-CC-BY-NC-SA-4.0.json} (100%) rename k8s/dataverse/persona/nfdi4health/licence/{licenseCC-BY-SA-4.0.json => license-CC-BY-SA-4.0.json} (100%) rename k8s/dataverse/persona/nfdi4health/licence/{licenseCC0-1.0.json => license-CC0-1.0.json} (93%) create mode 100644 k8s/dataverse/persona/nfdi4health/licence/license-Not-assigned.json diff --git a/k8s/dataverse/Chart.yaml b/k8s/dataverse/Chart.yaml index 19efce4..1528f31 100644 --- a/k8s/dataverse/Chart.yaml +++ b/k8s/dataverse/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.3 +version: 0.3.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/k8s/dataverse/persona/nfdi4health/init.sh b/k8s/dataverse/persona/nfdi4health/init.sh index 7f75b81..2b01c4d 100644 --- a/k8s/dataverse/persona/nfdi4health/init.sh +++ b/k8s/dataverse/persona/nfdi4health/init.sh @@ -46,6 +46,9 @@ while IFS= read -r TSV; do echo done <<< "${TSVS}" +echo "Disable custom terms of use" +curl -s -H "X-Dataverse-key:$API_TOKEN" -X PUT -d false $DATAVERSE_URL/aapi/admin/settings/:AllowCustomTermsOfUse + echo "Creating users" USERS=$(find $USERS_PATH -maxdepth 1 -iname '*.json') while IFS= read -r USER; do diff --git a/k8s/dataverse/persona/nfdi4health/licence/license-All-rights-reserved.json b/k8s/dataverse/persona/nfdi4health/licence/license-All-rights-reserved.json index 73c83f6..e6f4310 100644 --- a/k8s/dataverse/persona/nfdi4health/licence/license-All-rights-reserved.json +++ b/k8s/dataverse/persona/nfdi4health/licence/license-All-rights-reserved.json @@ -4,5 +4,5 @@ "shortDescription": "All rights reserved.", "iconUrl": "", "active": true, - "sortOrder": 8 + "sortOrder": 7 } diff --git a/k8s/dataverse/persona/nfdi4health/licence/licenseCC-BY-4.0.json b/k8s/dataverse/persona/nfdi4health/licence/license-CC-BY-4.0.json similarity index 100% rename from k8s/dataverse/persona/nfdi4health/licence/licenseCC-BY-4.0.json rename to k8s/dataverse/persona/nfdi4health/licence/license-CC-BY-4.0.json diff --git a/k8s/dataverse/persona/nfdi4health/licence/licenseCC-BY-NC-4.0.json b/k8s/dataverse/persona/nfdi4health/licence/license-CC-BY-NC-4.0.json similarity index 94% rename from k8s/dataverse/persona/nfdi4health/licence/licenseCC-BY-NC-4.0.json rename to k8s/dataverse/persona/nfdi4health/licence/license-CC-BY-NC-4.0.json index 5ce84fb..5005c82 100644 --- a/k8s/dataverse/persona/nfdi4health/licence/licenseCC-BY-NC-4.0.json +++ b/k8s/dataverse/persona/nfdi4health/licence/license-CC-BY-NC-4.0.json @@ -4,5 +4,5 @@ "shortDescription": "Creative Commons Attribution-NonCommercial 4.0 International License.", "iconUrl": "https://licensebuttons.net/l/by-nc/4.0/88x31.png", "active": true, - "sortOrder": 4 + "sortOrder": 5 } diff --git a/k8s/dataverse/persona/nfdi4health/licence/licenseCC-BY-NC-SA-4.0.json b/k8s/dataverse/persona/nfdi4health/licence/license-CC-BY-NC-SA-4.0.json similarity index 100% rename from k8s/dataverse/persona/nfdi4health/licence/licenseCC-BY-NC-SA-4.0.json rename to k8s/dataverse/persona/nfdi4health/licence/license-CC-BY-NC-SA-4.0.json diff --git a/k8s/dataverse/persona/nfdi4health/licence/licenseCC-BY-SA-4.0.json b/k8s/dataverse/persona/nfdi4health/licence/license-CC-BY-SA-4.0.json similarity index 100% rename from k8s/dataverse/persona/nfdi4health/licence/licenseCC-BY-SA-4.0.json rename to k8s/dataverse/persona/nfdi4health/licence/license-CC-BY-SA-4.0.json diff --git a/k8s/dataverse/persona/nfdi4health/licence/licenseCC0-1.0.json b/k8s/dataverse/persona/nfdi4health/licence/license-CC0-1.0.json similarity index 93% rename from k8s/dataverse/persona/nfdi4health/licence/licenseCC0-1.0.json rename to k8s/dataverse/persona/nfdi4health/licence/license-CC0-1.0.json index b681243..7bd629e 100644 --- a/k8s/dataverse/persona/nfdi4health/licence/licenseCC0-1.0.json +++ b/k8s/dataverse/persona/nfdi4health/licence/license-CC0-1.0.json @@ -4,5 +4,5 @@ "shortDescription": "Creative Commons CC0 1.0 Universal Public Domain Dedication.", "iconUrl": "https://licensebuttons.net/p/zero/1.0/88x31.png", "active": true, - "sortOrder": 8 + "sortOrder": 1 } diff --git a/k8s/dataverse/persona/nfdi4health/licence/license-Not-applicable.json b/k8s/dataverse/persona/nfdi4health/licence/license-Not-applicable.json index c24510d..40f67ae 100644 --- a/k8s/dataverse/persona/nfdi4health/licence/license-Not-applicable.json +++ b/k8s/dataverse/persona/nfdi4health/licence/license-Not-applicable.json @@ -4,5 +4,5 @@ "shortDescription": "Not applicable.", "iconUrl": "", "active": true, - "sortOrder": 8 + "sortOrder": 6 } diff --git a/k8s/dataverse/persona/nfdi4health/licence/license-Not-assigned.json b/k8s/dataverse/persona/nfdi4health/licence/license-Not-assigned.json new file mode 100644 index 0000000..8689376 --- /dev/null +++ b/k8s/dataverse/persona/nfdi4health/licence/license-Not-assigned.json @@ -0,0 +1,8 @@ +{ + "name": "Not assigned", + "uri": "Not-assigned", + "shortDescription": "Not assigned.", + "iconUrl": "", + "active": true, + "sortOrder": 8 +} diff --git a/k8s/dataverse/persona/nfdi4health/licence/license-Unknown.json b/k8s/dataverse/persona/nfdi4health/licence/license-Unknown.json index db08084..e88d1bf 100644 --- a/k8s/dataverse/persona/nfdi4health/licence/license-Unknown.json +++ b/k8s/dataverse/persona/nfdi4health/licence/license-Unknown.json @@ -4,5 +4,5 @@ "shortDescription": "Unknown.", "iconUrl": "", "active": true, - "sortOrder": 8 + "sortOrder": 9 }