mirror of
https://github.com/bitwarden/server.git
synced 2026-01-31 14:13:18 +08:00
* Increase organization max seat size from 30k to 2b (#1274) * Increase organization max seat size from 30k to 2b * PR review. Do not modify unless state matches expected * Organization sync simultaneous event reporting (#1275) * Split up azure messages according to max size * Allow simultaneous login of organization user events * Early resolve small event lists * Clarify logic Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com> * Improve readability This comes at the cost of multiple serializations, but the improvement in wire-time should more than make up for this on message where serialization time matters Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com> * Queue emails (#1286) * Extract common Azure queue methods * Do not use internal entity framework namespace * Prefer IEnumerable to IList unless needed All of these implementations were just using `Count == 1`, which is easily replicated. This will be used when abstracting Azure queues * Add model for azure queue message * Abstract Azure queue for reuse * Creat service to enqueue mail messages for later processing Azure queue mail service uses Azure queues. Blocking just blocks until all the work is done -- This is how emailing works today * Provide mail queue service to DI * Queue organization invite emails for later processing All emails can later be added to this queue * Create Admin hosted service to process enqueued mail messages * Prefer constructors to static generators * Mass delete organization users (#1287) * Add delete many to Organization Users * Correct formatting * Remove erroneous migration * Clarify parameter name * Formatting fixes * Simplify bump account revision sproc * Formatting fixes * Match file names to objects * Indicate if large import is expected * Early pull all existing users we were planning on inviting (#1290) * Early pull all existing users we were planning on inviting * Improve sproc name * Batch upsert org users (#1289) * Add UpsertMany sprocs to OrganizationUser * Add method to create TVPs from any object. Uses DbOrder attribute to generate. Sproc will fail unless TVP column order matches that of the db type * Combine migrations * Correct formatting * Include sql objects in sql project * Keep consisten parameter names * Batch deletes for performance * Correct formatting * consolidate migrations * Use batch methods in OrganizationImport * Declare @BatchSize * Transaction names limited to 32 chars Drop sproc before creating it if it exists * Update import tests * Allow for more users in org upgrades * Fix formatting * Improve class hierarchy structure * Use name tuple types * Fix formatting * Front load all reflection * Format constructor * Simplify ToTvp as class-specific extension Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
163 lines
5.0 KiB
C#
163 lines
5.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Bit.Core.Models.Mail;
|
|
using Bit.Core.Models.Table;
|
|
|
|
namespace Bit.Core.Services
|
|
{
|
|
public class NoopMailService : IMailService
|
|
{
|
|
public Task SendChangeEmailAlreadyExistsEmailAsync(string fromEmail, string toEmail)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendVerifyEmailEmailAsync(string email, Guid userId, string hint)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendChangeEmailEmailAsync(string newEmailAddress, string token)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendMasterPasswordHintEmailAsync(string email, string hint)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendNoMasterPasswordHintEmailAsync(string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendOrganizationAcceptedEmailAsync(string organizationName, string userEmail, IEnumerable<string> adminEmails)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendOrganizationConfirmedEmailAsync(string organizationName, string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, string token)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task BulkSendOrganizationInviteEmailAsync(string organizationName, IEnumerable<(OrganizationUser orgUser, string token)> invites)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendOrganizationUserRemovedForPolicyTwoStepEmailAsync(string organizationName, string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendTwoFactorEmailAsync(string email, string token)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendWelcomeEmailAsync(User user)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendVerifyDeleteEmailAsync(string email, Guid userId, string token)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendPasswordlessSignInAsync(string returnUrl, string token, string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendInvoiceUpcomingAsync(string email, decimal amount, DateTime dueDate,
|
|
List<string> items, bool mentionInvoices)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendPaymentFailedAsync(string email, decimal amount, bool mentionInvoices)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendAddedCreditAsync(string email, decimal amount)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendLicenseExpiredAsync(IEnumerable<string> emails, string organizationName = null)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendNewDeviceLoggedInEmail(string email, string deviceType, DateTime timestamp, string ip)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendRecoverTwoFactorEmail(string email, DateTime timestamp, string ip)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendOrganizationUserRemovedForPolicySingleOrgEmailAsync(string organizationName, string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendEmergencyAccessInviteEmailAsync(EmergencyAccess emergencyAccess, string name, string token)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendEmergencyAccessAcceptedEmailAsync(string granteeEmail, string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendEmergencyAccessConfirmedEmailAsync(string grantorName, string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendEmergencyAccessRecoveryInitiated(EmergencyAccess emergencyAccess, string initiatingName, string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendEmergencyAccessRecoveryApproved(EmergencyAccess emergencyAccess, string approvingName, string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendEmergencyAccessRecoveryRejected(EmergencyAccess emergencyAccess, string rejectingName, string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendEmergencyAccessRecoveryReminder(EmergencyAccess emergencyAccess, string initiatingName, string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendEmergencyAccessRecoveryTimedOut(EmergencyAccess ea, string initiatingName, string email)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task SendEnqueuedMailMessageAsync(IMailQueueMessage queueMessage)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
}
|
|
}
|