[PR #4441] [MERGED] improve access to collections via groups #2821

Closed
opened 2025-10-09 18:12:08 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/4441
Author: @stefan0xC
Created: 3/19/2024
Status: Merged
Merged: 4/27/2024
Merged by: @dani-garcia

Base: mainHead: fix-groups


📝 Commits (3)

  • 6ebaa4b refactor get_org_collections_details
  • 7890f58 improve access to collection check
  • ebddabd fix get_org_collection_detail too

📊 Changes

3 files changed (+23 additions, -41 deletions)

View changed files

📝 src/api/core/organizations.rs (+7 -23)
📝 src/auth.rs (+2 -6)
📝 src/db/models/collection.rs (+14 -12)

📄 Description

I've refactored the check if a user has access to a collection so it also takes into account access via groups (but only if ORG_GROUPS_ENABLED=true).

This should also return the correct result for get_org_collection_detail (though I'm not sure if this is used by the client).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/4441 **Author:** [@stefan0xC](https://github.com/stefan0xC) **Created:** 3/19/2024 **Status:** ✅ Merged **Merged:** 4/27/2024 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `fix-groups` --- ### 📝 Commits (3) - [`6ebaa4b`](https://github.com/dani-garcia/vaultwarden/commit/6ebaa4bfc3fbf64d8dcfe8607129e7e071374534) refactor get_org_collections_details - [`7890f58`](https://github.com/dani-garcia/vaultwarden/commit/7890f58984670cb6bc11728c8e240fa72a5692e3) improve access to collection check - [`ebddabd`](https://github.com/dani-garcia/vaultwarden/commit/ebddabd8488927e1f33026e871aa89430d6af867) fix get_org_collection_detail too ### 📊 Changes **3 files changed** (+23 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `src/api/core/organizations.rs` (+7 -23) 📝 `src/auth.rs` (+2 -6) 📝 `src/db/models/collection.rs` (+14 -12) </details> ### 📄 Description I've refactored the check if a user has access to a collection so it also takes into account access via groups (but only if `ORG_GROUPS_ENABLED=true`). This should also return the correct result for `get_org_collection_detail` (though I'm not sure if this is used by the client). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-09 18:12:08 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#2821