3142d8d Add more detail to invitation not found error
f20c470 Refactor 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>/reinvite endpoint. 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.
## 📋 Pull Request Information
**Original PR:** https://github.com/dani-garcia/vaultwarden/pull/318
**Author:** [@njfox](https://github.com/njfox)
**Created:** 12/30/2018
**Status:** ✅ Merged
**Merged:** 12/30/2018
**Merged by:** [@dani-garcia](https://github.com/dani-garcia)
**Base:** `master` ← **Head:** `reinvite_endpoint`
---
### 📝 Commits (3)
- [`84fa5a4`](https://github.com/dani-garcia/vaultwarden/commit/84fa5a4ed6b4cbbec7cf21ff22a067b14a2f66d5) Implement reinvite endpoint
- [`3142d8d`](https://github.com/dani-garcia/vaultwarden/commit/3142d8d01f7dc0c0d1f8c5d996a6218e27d5e96a) Add more detail to invitation not found error
- [`f20c470`](https://github.com/dani-garcia/vaultwarden/commit/f20c4705d97ed9431d5ddfad7001eb3919de9954) Refactor invite claims and disallow reinvites to virtual_org
### 📊 Changes
**1 file changed** (+63 additions, -18 deletions)
<details>
<summary>View changed files</summary>
📝 `src/api/core/organizations.rs` (+63 -18)
</details>
### 📄 Description
This PR implements the `/organizations/<org_id>/users/<user_org>/reinvite` endpoint. 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.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 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.