1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-11 21:03:47 -05:00

email user whenever they're removed from org because of 2fa policy (#657)

This commit is contained in:
Kyle Spearrin
2020-02-27 09:30:04 -05:00
committed by GitHub
parent 153709fe3b
commit f54ebfdc75
8 changed files with 63 additions and 1 deletions

View File

@ -669,6 +669,9 @@ namespace Bit.Core.Services
if(!ownerOrgs.Contains(policy.OrganizationId))
{
await organizationService.DeleteUserAsync(policy.OrganizationId, user.Id);
var organization = await _organizationRepository.GetByIdAsync(policy.OrganizationId);
await _mailService.SendOrganizationUserRemovedForPolicyTwoStepEmailAsync(
organization.Name, user.Email);
}
}
}