mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 09:46:00 +03:00
[PR #2773] [MERGED] fix invitations of new users when mail is disabled #3144
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#3144
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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/2773
Author: @stefan0xC
Created: 9/27/2022
Status: ✅ Merged
Merged: 10/19/2022
Merged by: @dani-garcia
Base:
main← Head:fix-invitation-of-new-users📝 Commits (1)
2215cfefix invitations of new users when mail is disabled📊 Changes
1 file changed (+5 additions, -6 deletions)
View changed files
📝
src/api/core/organizations.rs(+5 -6)📄 Description
While testing locally (where I don't have mail enabled) I noticed that inviting a new user will save them as invited. Removing and inviting the same user again (or inviting them in a second organization) they will be listed as accepted instead. This should not happen, because until the user has actually created an account they cannot be confirmed yet (and without admin panel access you would not know when they have done so).
If you try to confirm an

invitedaccepted but non-existing user you will be greeted with this error message:(The error happens client side so there are no relevant server logs.)
Since registering an account automatically accepts the outstanding invitations for a user anyway, setting UserOrgStatus::Accepted can be limited to already registered users (when mail is disabled).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.