1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

[EC-284] Prevent duplicate organization invites (#2113)

* prevent duplicate organization invites with test

* formatting
This commit is contained in:
Jake Fink
2022-07-13 09:21:28 -04:00
committed by GitHub
parent 62bf4c2385
commit 54cf3de11b
3 changed files with 25 additions and 3 deletions

View File

@ -1135,7 +1135,8 @@ namespace Bit.Core.Services
var events = new List<(OrganizationUser, EventType, DateTime?)>();
foreach (var (invite, externalId) in invites)
{
foreach (var email in invite.Emails)
// Prevent duplicate invitations
foreach (var email in invite.Emails.Distinct())
{
try
{