IQSS / IQSS/dataverse

Allow Admin to override :MaxEmbargoDurationInMonths Setting in API

Open
#8,528 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: File Upload & Handling Type: Suggestion User Role: API User User Role: Superuser
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

Overview of the Feature Request

As an admin, I would like to be able to set an embargo on file(s) that is longer than what is set in :MaxEmbargoDurationInMonths

What kind of user is the feature intended for?
This would be for Admins using the API - api/datasets/:persistentId/files/actions/:set-embargo
This would not be for non-admins using the API.

What inspired the request?
I want to set a default "low" embargo window with the MaxEmbargo setting - 12 months for dataset owners, but want admins to be able to set higher embargoes if needed - and have this longer embargo - only be accessible to admins.

What existing behavior do you want changed?
Currently the API "set-embargo" will not allow a date longer than the setting, get this error:

{"status":"ERROR","message":"Date available can not exceed MaxEmbargoDurationInMonths: 12"}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the api/datasets/:persistentId/files/actions/:set-embargo entry point and trace where MaxEmbargoDurationInMonths is enforced. Confirm how the caller's admin status is determined and preserve the existing limit for non-admins. Done means admins can set longer embargoes while non-admins still receive the current limit error, with coverage for both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, authorization, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.