IQSS / IQSS/dataverse

Feature Request: only one notification email/ per dataset after API grant file access

Open
#11,483 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: Notifications Type: Feature
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

Overview of the Feature Request
Our users often want access to a lot of datafiles from many datasets, because of this we use an API batch job to grant file Access:
curl -H "X-Dataverse-key:%API_TOKEN%" -X PUT %SERVER%/api/access/datafile/8542/grantAccess/%UserIdentifier%
curl -H "X-Dataverse-key:%API_TOKEN%" -X PUT %SERVER%/api/access/datafile/8539/grantAccess/%UserIdentifier%

This generates a lot of grant file access notification emails for users.

What kind of user is the feature intended for?
Users who have been granted many file accesses.

What inspired the request?
Users are annoyed of many notification emails. Of course, user can change the notification setting, but we have to inform the user before we grant access, to do this. And in principle we want the notification. But not so many.

What existing behavior do you want changed?
A behavior as in the GUI: Permissions->File->Grant Access. When using this Grant Access, there is only one email notification per dataset. If access granted via API of many datafiles from one dataset, there should be only one email notification send for the first file. The message text “You have been granted access for files in dataset:” is valid for one or more files. There should be a time setting to reset this behavior, if there’s another grant file access for the same dataset after a defined time, another grand access email notification should be sent. The best would be to set this time via API, e.g. after 1 hour, on next day, after 24h. But a fixed time would be also ok.

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 with the PUT /api/access/datafile/{id}/grantAccess/{user} endpoint and compare its behavior with Permissions->File->Grant Access in the GUI. Define how notifications are grouped per dataset, how the reset interval is selected or configured, and verify that one notification is sent for the intended grants.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.