Skip to content

feat: add API for getting default contributor role of a collection#12112

Merged
pdurbin merged 6 commits intoIQSS:developfrom
vera:feat/get-default-contributor-role
Apr 2, 2026
Merged

feat: add API for getting default contributor role of a collection#12112
pdurbin merged 6 commits intoIQSS:developfrom
vera:feat/get-default-contributor-role

Conversation

@vera
Copy link
Copy Markdown
Contributor

@vera vera commented Jan 26, 2026

What this PR does / why we need it:

This PR adds a new API endpoint for getting the default contributor role for a collection (GET /api/dataverses/$ID/defaultContributorRole), analogous to the existing endpoint for setting it (PUT /api/dataverses/$ID/defaultContributorRole/$ALIAS), added in this PR:

Which issue(s) this PR closes:

  • Not aware of any issue.

Special notes for your reviewer:

/

Suggestions on how to test this:

I've extended the existing test:

mvn test -Dtest="DataversesIT#testUpdateDefaultContributorRole"

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

/

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

I will add a short release note.

Additional documentation:

Preview docs at https://dataverse-guide--12112.org.readthedocs.build/en/12112/api/native-api.html#get-default-role-assigned-to-user-creating-a-dataset-in-a-dataverse-collection

@pdurbin pdurbin moved this to Ready for Triage in IQSS Dataverse Project Jan 26, 2026
@scolapasta scolapasta moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Jan 27, 2026
@cmbz cmbz added FY26 Sprint 15 FY26 Sprint 15 (2026-01-14 - 2026-01-28) FY26 Sprint 16 FY26 Sprint 16 (2026-01-28 - 2026-02-11) labels Jan 29, 2026
@cmbz cmbz added the FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) label Feb 11, 2026
@stevenwinship stevenwinship self-assigned this Feb 17, 2026
@stevenwinship stevenwinship moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Feb 17, 2026
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 24.326% (-0.01%) from 24.336%
when pulling 9be6c93 on vera:feat/get-default-contributor-role
into a843c84 on IQSS:develop.

Comment thread doc/release-notes/12112-get-default-contributor-role.md
@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Feb 25, 2026
@cmbz cmbz added the FY26 Sprint 18 FY26 Sprint 18 (2026-02-25 - 2026-03-11) label Feb 26, 2026
@cmbz cmbz added this to the 6.11 milestone Mar 11, 2026
@cmbz cmbz added the FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08) label Mar 27, 2026
@pdurbin pdurbin self-assigned this Apr 2, 2026
@pdurbin pdurbin moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Apr 2, 2026
@pdurbin pdurbin force-pushed the feat/get-default-contributor-role branch from a1dc84e to df216cb Compare April 2, 2026 16:12
Copy link
Copy Markdown
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

Tests are passing: https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-12112/5/testReport/

Docs look good: https://dataverse-guide--12112.org.readthedocs.build/en/12112/api/native-api.html#get-default-role-assigned-to-user-creating-a-dataset-in-a-dataverse-collection (see just above for the older, related endpoint)

I ran mvn test -Dtest=DataversesIT#testUpdateDefaultContributorRole manually locally and it worked fine. Here's some sample output:

{
    "status": "OK",
    "data": {
        "alias": "curator",
        "name": "Curator",
        "permissions": [
            "AddDataverse",
            "AddDataset",
            "ViewUnpublishedDataverse",
            "ViewUnpublishedDataset",
            "DownloadFile",
            "EditDataset",
            "ManageDatasetPermissions",
            "ManageFilePermissions",
            "PublishDataset",
            "LinkDataset",
            "DeleteDatasetDraft"
        ],
        "description": "For datasets, a person who can edit License + Terms, edit Permissions, and publish and link datasets.",
        "id": 7
    }
}

It's a little weird it that is says @author landreev when it's really @vera. 😄 I'll remove it.

I question a bit why any permissions are required for this endpoint but we can always loosen it up from ManageDataversePermissions to nothing later if people want. Actually, the docs don't explain the required permissions. They should. I'll add something to the docs for the new endpoint and the old one it's inspired by.

@pdurbin pdurbin merged commit 80fd9f7 into IQSS:develop Apr 2, 2026
11 of 13 checks passed
@github-project-automation github-project-automation bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Apr 2, 2026
@pdurbin pdurbin removed their assignment Apr 2, 2026
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Apr 6, 2026
@vera
Copy link
Copy Markdown
Contributor Author

vera commented Apr 9, 2026

It's a little weird it that is says @author landreev when it's really @vera. 😄 I'll remove it.

Oops, thanks for the cleanup 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 15 FY26 Sprint 15 (2026-01-14 - 2026-01-28) FY26 Sprint 16 FY26 Sprint 16 (2026-01-28 - 2026-02-11) FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) FY26 Sprint 18 FY26 Sprint 18 (2026-02-25 - 2026-03-11) FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08)

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

6 participants