[PR #7284] Org membership delete remove Invitation #31577

Open
opened 2026-06-17 11:33:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/7284
Author: @Timshel
Created: 6/1/2026
Status: 🔄 Open

Base: mainHead: fix/invite


📝 Commits (1)

  • 2706e9b Org membership delete remove Invitation

📊 Changes

1 file changed (+16 additions, -3 deletions)

View changed files

📝 src/api/core/organizations.rs (+16 -3)

📄 Description

While discussing https://github.com/dani-garcia/vaultwarden/pull/7272 realized that the Invitiation is not deleted when the membership is deleted through the Orgnaization membership.

And while testing I realized that if the user stub is already present then the Invitation is not created again.

Additionally, I wonder if the invitations check should not be done again when the user stub is present ? cf:

                if !CONFIG.invitations_allowed() {
                    err!(format!("User does not exist: {email}"))
                }
                if !CONFIG.is_email_domain_allowed(email) {
                    err!("Email domain not eligible for invitations")
                }

And realized that the revoked flow does not handle the Invitations creation/deletion nor check again the invitation/domain is still allowed on restoration.

Wanted some feedback before making more modifcations.


🔄 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/7284 **Author:** [@Timshel](https://github.com/Timshel) **Created:** 6/1/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/invite` --- ### 📝 Commits (1) - [`2706e9b`](https://github.com/dani-garcia/vaultwarden/commit/2706e9be3afba1e51ff0c4e34b61d3ef12a2ebf6) Org membership delete remove Invitation ### 📊 Changes **1 file changed** (+16 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/api/core/organizations.rs` (+16 -3) </details> ### 📄 Description While discussing https://github.com/dani-garcia/vaultwarden/pull/7272 realized that the `Invitiation` is not deleted when the membership is deleted through the Orgnaization membership. And while testing I realized that if the user stub is already present then the `Invitation` is not created again. Additionally, I wonder if the invitations check should not be done again when the user stub is present ? cf: ```rust if !CONFIG.invitations_allowed() { err!(format!("User does not exist: {email}")) } if !CONFIG.is_email_domain_allowed(email) { err!("Email domain not eligible for invitations") } ``` And realized that the revoked flow does not handle the `Invitations` creation/deletion nor check again the invitation/domain is still allowed on restoration. Wanted some feedback before making more modifcations. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-17 11:33:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#31577