1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2025-03-13 16:57:01 +01:00
vaultwarden/src/api/core
Mathijs van Veluw 86aaf27659
Prevent new users/members to be stored in db when invite fails (#5350)
* Prevent new users/members when invite fails

Currently when a (new) user gets invited as a member to an org, and SMTP is enabled, but sending the invite fails, the user is still created.
They will only not have received a mail, and admins/owners need to re-invite the member again.
Since the dialog window still keeps on-top when this fails, it kinda invites to click try again, but that will fail in mentioning the user is already a member.

To prevent this weird flow, this commit will delete the user, invite and member if sending the mail failed.
This allows the inviter to try again if there was a temporary hiccup for example, or contact the server admin and does not leave stray users/members around.

Fixes #5349

Signed-off-by: BlackDex <black.dex@gmail.com>

* Adjust deleting records

Signed-off-by: BlackDex <black.dex@gmail.com>

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-01-08 18:13:45 +01:00
..
two_factor Add TOTP delete endpoint (#5327) 2024-12-30 16:57:52 +01:00
accounts.rs Fix issue with key-rotate (#5348) 2025-01-04 23:00:05 +01:00
ciphers.rs Some refactoring and optimizations (#5291) 2024-12-14 00:55:34 +01:00
emergency_access.rs Some refactoring and optimizations (#5291) 2024-12-14 00:55:34 +01:00
events.rs Change API and structs to camelCase (#4386) 2024-06-23 21:31:02 +02:00
folders.rs Some refactoring and optimizations (#5291) 2024-12-14 00:55:34 +01:00
mod.rs Fix issue with key-rotate (#5348) 2025-01-04 23:00:05 +01:00
organizations.rs Prevent new users/members to be stored in db when invite fails (#5350) 2025-01-08 18:13:45 +01:00
public.rs Prevent new users/members to be stored in db when invite fails (#5350) 2025-01-08 18:13:45 +01:00
sends.rs Some refactoring and optimizations (#5291) 2024-12-14 00:55:34 +01:00