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

Unpublished Drafts a user has access to are not returned via /api/user/records #593

Open
karkraeg opened this issue Aug 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@karkraeg
Copy link
Member

Is your feature request related to a problem? Please describe.

Hi, can one get information about unpublished drafts that a user has been granted access to via the API?

Say User A creates a new draft and uses the "Share" Button on the deposit form to grant access to User B. User B wont be able to find the draft anywhere, it's only accessible if they know the exact URL. It would be great if one could get the data via /api/user/records as it is for published records from other users one has access to.

The docs state that GET /api/user/records ist "Used for interacting with the records and drafts you can edit."

-> when a user has been granted access ("Can manage" in the Share access modal of a draft) by another user to a draft of this user the draft does in fact not show up via /api/user/records.

@karkraeg karkraeg added the bug Something isn't working label Aug 13, 2024
@wgresshoff
Copy link
Contributor

I Think the problem is in invenio_rdm_records.services.search_params.MyDraftsParam: changing the search filter to "term", **{"is_published": False} yields the drafts to the users who have at least edit permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants