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

Edit Global Roles using Native API #10575

Open
DS-INRAE opened this issue May 21, 2024 · 1 comment · May be fixed by #10612
Open

Edit Global Roles using Native API #10575

DS-INRAE opened this issue May 21, 2024 · 1 comment · May be fixed by #10612
Labels
Type: Feature a feature request

Comments

@DS-INRAE
Copy link
Member

DS-INRAE commented May 21, 2024

Overview of the Feature Request
As an installation administrator (superuser),
I can update the global roles set for my installation using an API call
In order to avoid creating and deleting roles to adjust the permissions for my installation's role

What kind of user is the feature intended for?
Superuser

What inspired the request?
Our Use Case at Recherche Data Gouv : we want to have the collections' "Curator" role without the AddDataverse permission.
While if can be done either in the database or by creating & removing roles, it would be much cleaner and configurable for all installations to be able to tailor the roles via API.

We'd also like to edit the contributor role to allow them to manage file restrictions and private URLs but we'll need this issue resolved first for the second part:

Any brand new behavior do you want to add to Dataverse?

Add an API admin command to update a global role in the Dataverse installation. The data POSTed are assumed to be a role JSON.

POST http://$SERVER/api/admin/roles/$id

Example:

export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export SERVER_URL=https://demo.dataverse.org
export ID=24

curl -H "X-Dataverse-key:$API_TOKEN" -X POST "$SERVER_URL/api/admin/roles/$id" --upload-file roles.json

Document the new API command in the Native API guide between Create Global Role and Delete a Global Role

Any open or closed issues related to this feature request?

Issues about editing permissions for a role:

Ability to improve description of a role for one's installation, especially if it has been modified:

Similar issue, but for editing collection-level roles (needed for SPA):

Bugs that may affect/be affected by the feature:

Will you be able to contribute a Pull Request for this issue?
We'll need to investigate the effort needed, but as it will probably be a lot of work we are not likely to do it at least in 2024.

@DS-INRAE
Copy link
Member Author

I finally created the parallel issue for roles in collections here:

pdurbin added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Sep 16, 2024
pdurbin added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature a feature request
Projects
Status: Important/Needed
Status: 🚧 Dev by Recherche Data Gouv
Development

Successfully merging a pull request may close this issue.

1 participant