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:
@ -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,
|
||||
|
Reference in New Issue
Block a user