mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-06 09:13:03 +03:00
[PR #318] [MERGED] Add email reinvite endpoint #3752
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/318
Author: @njfox
Created: 12/30/2018
Status: ✅ Merged
Merged: 12/30/2018
Merged by: @dani-garcia
Base:
master← Head:reinvite_endpoint📝 Commits (3)
84fa5a4Implement reinvite endpoint3142d8dAdd more detail to invitation not found errorf20c470Refactor invite claims and disallow reinvites to virtual_org📊 Changes
1 file changed (+63 additions, -18 deletions)
View changed files
📝
src/api/core/organizations.rs(+63 -18)📄 Description
This PR implements the
/organizations/<org_id>/users/<user_org>/reinviteendpoint. Org admins can click the reinvite button from the manage organization page to generate a new invite email containing a fresh JWT.Note that this functionality won't work when reinviting directly to the virtual org (for instance, from the admin account) because the web vault calls the endpoint with the org ID and userorg ID, and users who haven't been invited into a real organization will not have either of those, so it is impossible to find the previously invited user based on those parameters. I've added an error message to handle this case.
I also have done a bit of refactoring by moving the invite claims generation into a separate function to reduce some code duplication between /invite and /reinvite.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.