mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-13 18:35:42 -05:00
[PR #31] [MERGED] Fix user invitation #2449
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:invite_fix📝 Commits (1)
85ecd00Fix user invitation📊 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:
accessAllis optional and sometimes not sentCollectionUser::save()in invitation handler we were incorrectly usingheaders.user.uuidchanging the Collection - User mapping for current user rather than the invited one.CollectionUser::save()was unnecessary inpost_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.