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
Extend the API to get Dataset user permissions, new File user permissions, and deaccessioned support for getDatasetVersion endpoint #10023
Conversation
…File API endpoint
…missionsOnFile and getVersion
This comment has been minimized.
This comment has been minimized.
@GPortas @donsizemore Also failing to build: |
…t-api-user-permissions
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
What this PR does / why we need it:
These changes are required for the SPA.
New query parameter
includeDeaccessioned
added to the getVersion endpoint (/api/datasets/{id}/versions/{versionId}) to consider deaccessioned versions when searching for versions.New endpoint to get user permissions on a dataset (/api/datasets/{id}/userPermissions). In particular, the user permissions that this API call checks, returned as booleans, are the following:
New permission check "canManageFilePermissions" added to the existing endpoint for getting user permissions on a file (/api/access/datafile/{id}/userPermissions).
Which issue(s) this PR closes:
Closes #10001
Special notes for your reviewer:
None
Suggestions on how to test this:
Via curl, perform calls for different users (different API keys), and check that the retrieved permissions are correct.
For dataset user permissions:
curl -H "X-Dataverse-key: $API_TOKEN" -X GET "$SERVER_URL/api/datasets/$ID/userPermissions"
For file user permissions:
curl -H "X-Dataverse-key:$API_TOKEN" -X GET "$SERVER_URL/api/access/datafile/$ID/userPermissions"
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No
Is there a release notes update needed for this change?:
Yes
Additional documentation:
None