[PR #31] [MERGED] Fix user invitation #2449

Closed
opened 2025-11-07 07:43:57 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/31
Author: @mprasil
Created: 5/28/2018
Status: Merged
Merged: 5/28/2018
Merged by: @dani-garcia

Base: masterHead: invite_fix


📝 Commits (1)

📊 Changes

2 files changed (+40 additions, -25 deletions)

View changed files

📝 src/api/core/organizations.rs (+25 -15)
📝 src/db/models/collection.rs (+15 -10)

📄 Description

This fixes three issues:

  1. On invitation accessAll is optional and sometimes not sent
  2. On CollectionUser::save() in invitation handler we were incorrectly using headers.user.uuid changing the Collection - User mapping for current user rather than the invited one.
  3. The CollectionUser::save() was unnecessary in post_organization_collections() as the user making the POST request is already verified as Organization Admin or Owner and these have access to Collection anyways.

When updating collections for users we now also check if collection is in the Organization we're updating for.

As a side work I've also fixed the CollectionUser::save() for #6


🔄 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/31 **Author:** [@mprasil](https://github.com/mprasil) **Created:** 5/28/2018 **Status:** ✅ Merged **Merged:** 5/28/2018 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `master` ← **Head:** `invite_fix` --- ### 📝 Commits (1) - [`85ecd00`](https://github.com/dani-garcia/vaultwarden/commit/85ecd001a5c752683b58a460c9130599940d9769) Fix user invitation ### 📊 Changes **2 files changed** (+40 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `src/api/core/organizations.rs` (+25 -15) 📝 `src/db/models/collection.rs` (+15 -10) </details> ### 📄 Description This fixes three issues: 1. On invitation `accessAll` is optional and sometimes not sent 2. On `CollectionUser::save()` in invitation handler we were incorrectly using `headers.user.uuid` changing the Collection - User mapping for current user rather than the invited one. 3. The `CollectionUser::save()` was unnecessary in `post_organization_collections()` as the user making the POST request is already verified as Organization Admin or Owner and these have access to Collection anyways. When updating collections for users we now also check if collection is in the Organization we're updating for. As a side work I've also fixed the `CollectionUser::save()` for #6 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-07 07:43:57 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#2449