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

DD-521 Default license #95

Merged
merged 3 commits into from
Jun 28, 2021
Merged

Conversation

janvanmansum
Copy link

@janvanmansum janvanmansum commented Jun 22, 2021

Fixes DD-512

Description of changes

  • Added column isDefault to the license table.
  • Added API endpoint for setting default license as specified in DD-520 (see comment of 2021-06-22).

How to test

  1. Start with base box with Dataverse v5.5 on it (not the DANS-DataStation branch because the database update will probably not work when starting from the license table without the extra column)

  2. Build this PR

  3. Deploy the new war

  4. Add an extra license, for example:

    {
     "name": "CC-BY",
     "uri": "http://creativecommons.org/licenses/by/4.0",
     "iconUrl": "https://licensebuttons.net/l/by/3.0/88x31.png",
     "active": true
    }
  5. Set the default to this new license: curl -X PUT -H 'Content-Type: text/plain' -d <id> http://localhost:8080/api/admin/licenses/default (set <id> to the id of the new license).

  6. Create a new dataset and check that by default the license is set correctly.

Related PRs

(Add links)
*

Notify

@DANS-KNAW/dataversedans

@janvanmansum janvanmansum marked this pull request as draft June 22, 2021 19:27
@janvanmansum janvanmansum marked this pull request as ready for review June 28, 2021 07:59
@janvanmansum janvanmansum changed the title DD-512 Default license DD-521 Default license Jun 28, 2021
@mderuijter
Copy link

mderuijter commented Jun 28, 2021

@janvanmansum Works as advertised, proper default license is shown.

One issue though:
image
License icon is not rendered properly, maybe a faulty link?
image

@janvanmansum
Copy link
Author

@mderuijter what happens when you click https://licensebuttons.net/l/by/3.0/88x31.png ?

@mderuijter
Copy link

@mderuijter what happens when you click https://licensebuttons.net/l/by/3.0/88x31.png ?

No image, so it's the link

@janvanmansum
Copy link
Author

Merging this, we should think about a good "alternative text" when the image does not load.

@janvanmansum janvanmansum merged commit 6516186 into DANS-KNAW:multi-license Jun 28, 2021
@janvanmansum janvanmansum deleted the DD-521 branch July 14, 2021 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants