[GH-ISSUE #26] get_org_collection_detail() errors with "Collection not found" when User isn't directly assigned to collection #32960

Closed
opened 2026-07-13 17:12:17 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @mprasil on GitHub (May 19, 2018).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/26

The function doesn't work for UserOrganization with access_all, for Admin or Owner that doesn't have direct CollectionUser mapping.

This is because we only use Collection::find_by_uuid_and_user() in the handler, but the above users don't necessarily need to have access allowed for specific Collection as they can generally access any Collection within Organization. We need to check whether that isn't the case before returning error.

Originally created by @mprasil on GitHub (May 19, 2018). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/26 The function doesn't work for `UserOrganization` with `access_all`, for `Admin` or `Owner` that doesn't have direct `CollectionUser` mapping. This is because we only use `Collection::find_by_uuid_and_user()` in the handler, but the above users don't necessarily need to have access allowed for specific `Collection` as they can generally access any `Collection` within `Organization`. We need to check whether that isn't the case before returning error.
Author
Owner

@dani-garcia commented on GitHub (May 21, 2018):

This should be fixed by your PR #28 so I'm closing it. Thanks!

<!-- gh-comment-id:390757290 --> @dani-garcia commented on GitHub (May 21, 2018): This should be fixed by your PR #28 so I'm closing it. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#32960