1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

[PM-19290] Skip the notification step if no admin emails are available. (#5582)

This commit is contained in:
Jimmy Vo
2025-04-02 15:23:31 -04:00
committed by GitHub
parent b309de141d
commit aef05f5fb6
2 changed files with 88 additions and 0 deletions

View File

@ -289,6 +289,12 @@ public class AuthRequestService : IAuthRequestService
{
var adminEmails = await GetAdminAndAccountRecoveryEmailsAsync(organizationUser.OrganizationId);
if (adminEmails.Count == 0)
{
_logger.LogWarning("There are no admin emails to send to.");
return;
}
await _mailService.SendDeviceApprovalRequestedNotificationEmailAsync(
adminEmails,
organizationUser.OrganizationId,