1
0
mirror of https://github.com/bitwarden/server synced 2025-12-25 20:53:16 +00:00

Revert filescoped (#2227)

* Revert "Add git blame entry (#2226)"

This reverts commit 239286737d.

* Revert "Turn on file scoped namespaces (#2225)"

This reverts commit 34fb4cca2a.
This commit is contained in:
Justin Baur
2022-08-29 15:53:48 -04:00
committed by GitHub
parent 239286737d
commit bae03feffe
1208 changed files with 74317 additions and 73126 deletions

View File

@@ -2,68 +2,69 @@
using Bit.Core.Enums;
using Bit.Core.Models.Data;
namespace Bit.Core.Services;
public class NoopAttachmentStorageService : IAttachmentStorageService
namespace Bit.Core.Services
{
public FileUploadType FileUploadType => FileUploadType.Direct;
public class NoopAttachmentStorageService : IAttachmentStorageService
{
public FileUploadType FileUploadType => FileUploadType.Direct;
public Task CleanupAsync(Guid cipherId)
{
return Task.FromResult(0);
}
public Task CleanupAsync(Guid cipherId)
{
return Task.FromResult(0);
}
public Task DeleteAttachmentAsync(Guid cipherId, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult(0);
}
public Task DeleteAttachmentAsync(Guid cipherId, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult(0);
}
public Task DeleteAttachmentsForCipherAsync(Guid cipherId)
{
return Task.FromResult(0);
}
public Task DeleteAttachmentsForCipherAsync(Guid cipherId)
{
return Task.FromResult(0);
}
public Task DeleteAttachmentsForOrganizationAsync(Guid organizationId)
{
return Task.FromResult(0);
}
public Task DeleteAttachmentsForOrganizationAsync(Guid organizationId)
{
return Task.FromResult(0);
}
public Task DeleteAttachmentsForUserAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task DeleteAttachmentsForUserAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task RollbackShareAttachmentAsync(Guid cipherId, Guid organizationId, CipherAttachment.MetaData attachmentData, string originalContainer)
{
return Task.FromResult(0);
}
public Task RollbackShareAttachmentAsync(Guid cipherId, Guid organizationId, CipherAttachment.MetaData attachmentData, string originalContainer)
{
return Task.FromResult(0);
}
public Task StartShareAttachmentAsync(Guid cipherId, Guid organizationId, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult(0);
}
public Task StartShareAttachmentAsync(Guid cipherId, Guid organizationId, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult(0);
}
public Task UploadNewAttachmentAsync(Stream stream, Cipher cipher, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult(0);
}
public Task UploadNewAttachmentAsync(Stream stream, Cipher cipher, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult(0);
}
public Task UploadShareAttachmentAsync(Stream stream, Guid cipherId, Guid organizationId, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult(0);
}
public Task UploadShareAttachmentAsync(Stream stream, Guid cipherId, Guid organizationId, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult(0);
}
public Task<string> GetAttachmentDownloadUrlAsync(Cipher cipher, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult((string)null);
}
public Task<string> GetAttachmentDownloadUrlAsync(Cipher cipher, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult((string)null);
}
public Task<string> GetAttachmentUploadUrlAsync(Cipher cipher, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult(default(string));
}
public Task<(bool, long?)> ValidateFileAsync(Cipher cipher, CipherAttachment.MetaData attachmentData, long leeway)
{
return Task.FromResult((false, (long?)null));
public Task<string> GetAttachmentUploadUrlAsync(Cipher cipher, CipherAttachment.MetaData attachmentData)
{
return Task.FromResult(default(string));
}
public Task<(bool, long?)> ValidateFileAsync(Cipher cipher, CipherAttachment.MetaData attachmentData, long leeway)
{
return Task.FromResult((false, (long?)null));
}
}
}

View File

@@ -1,10 +1,11 @@
namespace Bit.Core.Services;
public class NoopBlockIpService : IBlockIpService
namespace Bit.Core.Services
{
public Task BlockIpAsync(string ipAddress, bool permanentBlock)
public class NoopBlockIpService : IBlockIpService
{
// Do nothing
return Task.FromResult(0);
public Task BlockIpAsync(string ipAddress, bool permanentBlock)
{
// Do nothing
return Task.FromResult(0);
}
}
}

View File

@@ -2,17 +2,18 @@
using Bit.Core.Entities;
using Bit.Core.Models.Business;
namespace Bit.Core.Services;
public class NoopCaptchaValidationService : ICaptchaValidationService
namespace Bit.Core.Services
{
public string SiteKeyResponseKeyName => null;
public string SiteKey => null;
public bool RequireCaptchaValidation(ICurrentContext currentContext, User user = null) => false;
public string GenerateCaptchaBypassToken(User user) => "";
public Task<CaptchaResponse> ValidateCaptchaResponseAsync(string captchaResponse, string clientIpAddress,
User user = null)
public class NoopCaptchaValidationService : ICaptchaValidationService
{
return Task.FromResult(new CaptchaResponse { Success = true });
public string SiteKeyResponseKeyName => null;
public string SiteKey => null;
public bool RequireCaptchaValidation(ICurrentContext currentContext, User user = null) => false;
public string GenerateCaptchaBypassToken(User user) => "";
public Task<CaptchaResponse> ValidateCaptchaResponseAsync(string captchaResponse, string clientIpAddress,
User user = null)
{
return Task.FromResult(new CaptchaResponse { Success = true });
}
}
}

View File

@@ -2,69 +2,70 @@
using Bit.Core.Entities.Provider;
using Bit.Core.Enums;
namespace Bit.Core.Services;
public class NoopEventService : IEventService
namespace Bit.Core.Services
{
public Task LogCipherEventAsync(Cipher cipher, EventType type, DateTime? date = null)
public class NoopEventService : IEventService
{
return Task.FromResult(0);
}
public Task LogCipherEventAsync(Cipher cipher, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogCipherEventsAsync(IEnumerable<Tuple<Cipher, EventType, DateTime?>> events)
{
return Task.FromResult(0);
}
public Task LogCipherEventsAsync(IEnumerable<Tuple<Cipher, EventType, DateTime?>> events)
{
return Task.FromResult(0);
}
public Task LogCollectionEventAsync(Collection collection, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogCollectionEventAsync(Collection collection, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogPolicyEventAsync(Policy policy, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogPolicyEventAsync(Policy policy, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogGroupEventAsync(Group group, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogGroupEventAsync(Group group, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogOrganizationEventAsync(Organization organization, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogOrganizationEventAsync(Organization organization, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogProviderUserEventAsync(ProviderUser providerUser, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogProviderUserEventAsync(ProviderUser providerUser, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogProviderUsersEventAsync(IEnumerable<(ProviderUser, EventType, DateTime?)> events)
{
return Task.FromResult(0);
}
public Task LogProviderUsersEventAsync(IEnumerable<(ProviderUser, EventType, DateTime?)> events)
{
return Task.FromResult(0);
}
public Task LogProviderOrganizationEventAsync(ProviderOrganization providerOrganization, EventType type,
DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogProviderOrganizationEventAsync(ProviderOrganization providerOrganization, EventType type,
DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogOrganizationUserEventAsync(OrganizationUser organizationUser, EventType type,
DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogOrganizationUserEventAsync(OrganizationUser organizationUser, EventType type,
DateTime? date = null)
{
return Task.FromResult(0);
}
public Task LogOrganizationUserEventsAsync(IEnumerable<(OrganizationUser, EventType, DateTime?)> events)
{
return Task.FromResult(0);
}
public Task LogOrganizationUserEventsAsync(IEnumerable<(OrganizationUser, EventType, DateTime?)> events)
{
return Task.FromResult(0);
}
public Task LogUserEventAsync(Guid userId, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
public Task LogUserEventAsync(Guid userId, EventType type, DateTime? date = null)
{
return Task.FromResult(0);
}
}
}

View File

@@ -1,16 +1,17 @@
using Bit.Core.Models.Data;
namespace Bit.Core.Services;
public class NoopEventWriteService : IEventWriteService
namespace Bit.Core.Services
{
public Task CreateAsync(IEvent e)
public class NoopEventWriteService : IEventWriteService
{
return Task.FromResult(0);
}
public Task CreateAsync(IEvent e)
{
return Task.FromResult(0);
}
public Task CreateManyAsync(IEnumerable<IEvent> e)
{
return Task.FromResult(0);
public Task CreateManyAsync(IEnumerable<IEvent> e)
{
return Task.FromResult(0);
}
}
}

View File

@@ -4,52 +4,53 @@ using Bit.Core.Settings;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace Bit.Core.Services;
public class NoopLicensingService : ILicensingService
namespace Bit.Core.Services
{
public NoopLicensingService(
IWebHostEnvironment environment,
GlobalSettings globalSettings)
public class NoopLicensingService : ILicensingService
{
if (!environment.IsDevelopment() && globalSettings.SelfHosted)
public NoopLicensingService(
IWebHostEnvironment environment,
GlobalSettings globalSettings)
{
throw new Exception($"{nameof(NoopLicensingService)} cannot be used for self hosted instances.");
if (!environment.IsDevelopment() && globalSettings.SelfHosted)
{
throw new Exception($"{nameof(NoopLicensingService)} cannot be used for self hosted instances.");
}
}
public Task ValidateOrganizationsAsync()
{
return Task.FromResult(0);
}
public Task ValidateUsersAsync()
{
return Task.FromResult(0);
}
public Task<bool> ValidateUserPremiumAsync(User user)
{
return Task.FromResult(user.Premium);
}
public bool VerifyLicense(ILicense license)
{
return true;
}
public byte[] SignLicense(ILicense license)
{
return new byte[0];
}
public Task<OrganizationLicense> ReadOrganizationLicenseAsync(Organization organization)
{
return Task.FromResult<OrganizationLicense>(null);
}
public Task<OrganizationLicense> ReadOrganizationLicenseAsync(Guid organizationId)
{
return Task.FromResult<OrganizationLicense>(null);
}
}
public Task ValidateOrganizationsAsync()
{
return Task.FromResult(0);
}
public Task ValidateUsersAsync()
{
return Task.FromResult(0);
}
public Task<bool> ValidateUserPremiumAsync(User user)
{
return Task.FromResult(user.Premium);
}
public bool VerifyLicense(ILicense license)
{
return true;
}
public byte[] SignLicense(ILicense license)
{
return new byte[0];
}
public Task<OrganizationLicense> ReadOrganizationLicenseAsync(Organization organization)
{
return Task.FromResult<OrganizationLicense>(null);
}
public Task<OrganizationLicense> ReadOrganizationLicenseAsync(Guid organizationId)
{
return Task.FromResult<OrganizationLicense>(null);
}
}

View File

@@ -1,11 +1,12 @@
using Bit.Core.Models.Mail;
namespace Bit.Core.Services;
public class NoopMailDeliveryService : IMailDeliveryService
namespace Bit.Core.Services
{
public Task SendEmailAsync(MailMessage message)
public class NoopMailDeliveryService : IMailDeliveryService
{
return Task.FromResult(0);
public Task SendEmailAsync(MailMessage message)
{
return Task.FromResult(0);
}
}
}

View File

@@ -3,238 +3,239 @@ using Bit.Core.Entities.Provider;
using Bit.Core.Models.Business;
using Bit.Core.Models.Mail;
namespace Bit.Core.Services;
public class NoopMailService : IMailService
namespace Bit.Core.Services
{
public Task SendChangeEmailAlreadyExistsEmailAsync(string fromEmail, string toEmail)
public class NoopMailService : IMailService
{
return Task.FromResult(0);
}
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 SendVerifyEmailEmailAsync(string email, Guid userId, string hint)
{
return Task.FromResult(0);
}
public Task SendChangeEmailEmailAsync(string newEmailAddress, string token)
{
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 SendMasterPasswordHintEmailAsync(string email, string hint)
{
return Task.FromResult(0);
}
public Task SendNoMasterPasswordHintEmailAsync(string email)
{
return Task.FromResult(0);
}
public Task SendNoMasterPasswordHintEmailAsync(string email)
{
return Task.FromResult(0);
}
public Task SendOrganizationMaxSeatLimitReachedEmailAsync(Organization organization, int maxSeatCount, IEnumerable<string> ownerEmails)
{
return Task.FromResult(0);
}
public Task SendOrganizationMaxSeatLimitReachedEmailAsync(Organization organization, int maxSeatCount, IEnumerable<string> ownerEmails)
{
return Task.FromResult(0);
}
public Task SendOrganizationAutoscaledEmailAsync(Organization organization, int initialSeatCount, IEnumerable<string> ownerEmails)
{
return Task.FromResult(0);
}
public Task SendOrganizationAutoscaledEmailAsync(Organization organization, int initialSeatCount, IEnumerable<string> ownerEmails)
{
return Task.FromResult(0);
}
public Task SendOrganizationAcceptedEmailAsync(Organization organization, string userIdentifier, IEnumerable<string> adminEmails)
{
return Task.FromResult(0);
}
public Task SendOrganizationAcceptedEmailAsync(Organization organization, string userIdentifier, IEnumerable<string> adminEmails)
{
return Task.FromResult(0);
}
public Task SendOrganizationConfirmedEmailAsync(string organizationName, string email)
{
return Task.FromResult(0);
}
public Task SendOrganizationConfirmedEmailAsync(string organizationName, string email)
{
return Task.FromResult(0);
}
public Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, ExpiringToken token)
{
return Task.FromResult(0);
}
public Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, ExpiringToken token)
{
return Task.FromResult(0);
}
public Task BulkSendOrganizationInviteEmailAsync(string organizationName, IEnumerable<(OrganizationUser orgUser, ExpiringToken token)> invites)
{
return Task.FromResult(0);
}
public Task BulkSendOrganizationInviteEmailAsync(string organizationName, IEnumerable<(OrganizationUser orgUser, ExpiringToken token)> invites)
{
return Task.FromResult(0);
}
public Task SendOrganizationUserRemovedForPolicyTwoStepEmailAsync(string organizationName, string email)
{
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 SendTwoFactorEmailAsync(string email, string token)
{
return Task.FromResult(0);
}
public Task SendNewDeviceLoginTwoFactorEmailAsync(string email, string token)
{
return Task.CompletedTask;
}
public Task SendNewDeviceLoginTwoFactorEmailAsync(string email, string token)
{
return Task.CompletedTask;
}
public Task SendWelcomeEmailAsync(User user)
{
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 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 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 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 SendPaymentFailedAsync(string email, decimal amount, bool mentionInvoices)
{
return Task.FromResult(0);
}
public Task SendAddedCreditAsync(string email, decimal amount)
{
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 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 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 SendRecoverTwoFactorEmail(string email, DateTime timestamp, string ip)
{
return Task.FromResult(0);
}
public Task SendOrganizationUserRemovedForPolicySingleOrgEmailAsync(string organizationName, string email)
{
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 SendEmergencyAccessInviteEmailAsync(EmergencyAccess emergencyAccess, string name, string token)
{
return Task.FromResult(0);
}
public Task SendEmergencyAccessAcceptedEmailAsync(string granteeEmail, string email)
{
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 SendEmergencyAccessConfirmedEmailAsync(string grantorName, string email)
{
return Task.FromResult(0);
}
public Task SendEmergencyAccessRecoveryInitiated(EmergencyAccess emergencyAccess, string initiatingName, 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 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 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 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 SendEmergencyAccessRecoveryTimedOut(EmergencyAccess ea, string initiatingName, string email)
{
return Task.FromResult(0);
}
public Task SendEnqueuedMailMessageAsync(IMailQueueMessage queueMessage)
{
return Task.FromResult(0);
}
public Task SendEnqueuedMailMessageAsync(IMailQueueMessage queueMessage)
{
return Task.FromResult(0);
}
public Task SendAdminResetPasswordEmailAsync(string email, string userName, string orgName)
{
return Task.FromResult(0);
}
public Task SendAdminResetPasswordEmailAsync(string email, string userName, string orgName)
{
return Task.FromResult(0);
}
public Task SendProviderSetupInviteEmailAsync(Provider provider, string token, string email)
{
return Task.FromResult(0);
}
public Task SendProviderSetupInviteEmailAsync(Provider provider, string token, string email)
{
return Task.FromResult(0);
}
public Task SendProviderInviteEmailAsync(string providerName, ProviderUser providerUser, string token, string email)
{
return Task.FromResult(0);
}
public Task SendProviderInviteEmailAsync(string providerName, ProviderUser providerUser, string token, string email)
{
return Task.FromResult(0);
}
public Task SendProviderConfirmedEmailAsync(string providerName, string email)
{
return Task.FromResult(0);
}
public Task SendProviderConfirmedEmailAsync(string providerName, string email)
{
return Task.FromResult(0);
}
public Task SendProviderUserRemoved(string providerName, string email)
{
return Task.FromResult(0);
}
public Task SendProviderUserRemoved(string providerName, string email)
{
return Task.FromResult(0);
}
public Task SendUpdatedTempPasswordEmailAsync(string email, string userName)
{
return Task.FromResult(0);
}
public Task SendUpdatedTempPasswordEmailAsync(string email, string userName)
{
return Task.FromResult(0);
}
public Task SendFamiliesForEnterpriseOfferEmailAsync(string SponsorOrgName, string email, bool existingAccount, string token)
{
return Task.FromResult(0);
}
public Task SendFamiliesForEnterpriseOfferEmailAsync(string SponsorOrgName, string email, bool existingAccount, string token)
{
return Task.FromResult(0);
}
public Task BulkSendFamiliesForEnterpriseOfferEmailAsync(string SponsorOrgName, IEnumerable<(string Email, bool ExistingAccount, string Token)> invites)
{
return Task.FromResult(0);
}
public Task BulkSendFamiliesForEnterpriseOfferEmailAsync(string SponsorOrgName, IEnumerable<(string Email, bool ExistingAccount, string Token)> invites)
{
return Task.FromResult(0);
}
public Task SendFamiliesForEnterpriseRedeemedEmailsAsync(string familyUserEmail, string sponsorEmail)
{
return Task.FromResult(0);
}
public Task SendFamiliesForEnterpriseRedeemedEmailsAsync(string familyUserEmail, string sponsorEmail)
{
return Task.FromResult(0);
}
public Task SendFamiliesForEnterpriseSponsorshipRevertingEmailAsync(string email, DateTime expirationDate)
{
return Task.FromResult(0);
}
public Task SendFamiliesForEnterpriseSponsorshipRevertingEmailAsync(string email, DateTime expirationDate)
{
return Task.FromResult(0);
}
public Task SendOTPEmailAsync(string email, string token)
{
return Task.FromResult(0);
}
public Task SendOTPEmailAsync(string email, string token)
{
return Task.FromResult(0);
}
public Task SendFailedLoginAttemptsEmailAsync(string email, DateTime utcNow, string ip)
{
return Task.FromResult(0);
}
public Task SendFailedLoginAttemptsEmailAsync(string email, DateTime utcNow, string ip)
{
return Task.FromResult(0);
}
public Task SendFailedTwoFactorAttemptsEmailAsync(string email, DateTime utcNow, string ip)
{
return Task.FromResult(0);
public Task SendFailedTwoFactorAttemptsEmailAsync(string email, DateTime utcNow, string ip)
{
return Task.FromResult(0);
}
}
}

View File

@@ -3,35 +3,36 @@ using Bit.Core.Entities.Provider;
using Bit.Core.Models.Business;
using Bit.Core.Models.Business.Provider;
namespace Bit.Core.Services;
public class NoopProviderService : IProviderService
namespace Bit.Core.Services
{
public Task CreateAsync(string ownerEmail) => throw new NotImplementedException();
public class NoopProviderService : IProviderService
{
public Task CreateAsync(string ownerEmail) => throw new NotImplementedException();
public Task<Provider> CompleteSetupAsync(Provider provider, Guid ownerUserId, string token, string key) => throw new NotImplementedException();
public Task<Provider> CompleteSetupAsync(Provider provider, Guid ownerUserId, string token, string key) => throw new NotImplementedException();
public Task UpdateAsync(Provider provider, bool updateBilling = false) => throw new NotImplementedException();
public Task UpdateAsync(Provider provider, bool updateBilling = false) => throw new NotImplementedException();
public Task<List<ProviderUser>> InviteUserAsync(ProviderUserInvite<string> invite) => throw new NotImplementedException();
public Task<List<ProviderUser>> InviteUserAsync(ProviderUserInvite<string> invite) => throw new NotImplementedException();
public Task<List<Tuple<ProviderUser, string>>> ResendInvitesAsync(ProviderUserInvite<Guid> invite) => throw new NotImplementedException();
public Task<List<Tuple<ProviderUser, string>>> ResendInvitesAsync(ProviderUserInvite<Guid> invite) => throw new NotImplementedException();
public Task<ProviderUser> AcceptUserAsync(Guid providerUserId, User user, string token) => throw new NotImplementedException();
public Task<ProviderUser> AcceptUserAsync(Guid providerUserId, User user, string token) => throw new NotImplementedException();
public Task<List<Tuple<ProviderUser, string>>> ConfirmUsersAsync(Guid providerId, Dictionary<Guid, string> keys, Guid confirmingUserId) => throw new NotImplementedException();
public Task<List<Tuple<ProviderUser, string>>> ConfirmUsersAsync(Guid providerId, Dictionary<Guid, string> keys, Guid confirmingUserId) => throw new NotImplementedException();
public Task SaveUserAsync(ProviderUser user, Guid savingUserId) => throw new NotImplementedException();
public Task SaveUserAsync(ProviderUser user, Guid savingUserId) => throw new NotImplementedException();
public Task<List<Tuple<ProviderUser, string>>> DeleteUsersAsync(Guid providerId, IEnumerable<Guid> providerUserIds, Guid deletingUserId) => throw new NotImplementedException();
public Task<List<Tuple<ProviderUser, string>>> DeleteUsersAsync(Guid providerId, IEnumerable<Guid> providerUserIds, Guid deletingUserId) => throw new NotImplementedException();
public Task AddOrganization(Guid providerId, Guid organizationId, Guid addingUserId, string key) => throw new NotImplementedException();
public Task AddOrganization(Guid providerId, Guid organizationId, Guid addingUserId, string key) => throw new NotImplementedException();
public Task<ProviderOrganization> CreateOrganizationAsync(Guid providerId, OrganizationSignup organizationSignup, string clientOwnerEmail, User user) => throw new NotImplementedException();
public Task<ProviderOrganization> CreateOrganizationAsync(Guid providerId, OrganizationSignup organizationSignup, string clientOwnerEmail, User user) => throw new NotImplementedException();
public Task RemoveOrganizationAsync(Guid providerId, Guid providerOrganizationId, Guid removingUserId) => throw new NotImplementedException();
public Task RemoveOrganizationAsync(Guid providerId, Guid providerOrganizationId, Guid removingUserId) => throw new NotImplementedException();
public Task LogProviderAccessToOrganizationAsync(Guid organizationId) => throw new NotImplementedException();
public Task LogProviderAccessToOrganizationAsync(Guid organizationId) => throw new NotImplementedException();
public Task ResendProviderSetupInviteEmailAsync(Guid providerId, Guid userId) => throw new NotImplementedException();
public Task ResendProviderSetupInviteEmailAsync(Guid providerId, Guid userId) => throw new NotImplementedException();
}
}

View File

@@ -1,89 +1,90 @@
using Bit.Core.Entities;
using Bit.Core.Enums;
namespace Bit.Core.Services;
public class NoopPushNotificationService : IPushNotificationService
namespace Bit.Core.Services
{
public Task PushSyncCipherCreateAsync(Cipher cipher, IEnumerable<Guid> collectionIds)
public class NoopPushNotificationService : IPushNotificationService
{
return Task.FromResult(0);
}
public Task PushSyncCipherCreateAsync(Cipher cipher, IEnumerable<Guid> collectionIds)
{
return Task.FromResult(0);
}
public Task PushSyncCipherDeleteAsync(Cipher cipher)
{
return Task.FromResult(0);
}
public Task PushSyncCipherDeleteAsync(Cipher cipher)
{
return Task.FromResult(0);
}
public Task PushSyncCiphersAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task PushSyncCiphersAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task PushSyncCipherUpdateAsync(Cipher cipher, IEnumerable<Guid> collectionIds)
{
return Task.FromResult(0);
}
public Task PushSyncCipherUpdateAsync(Cipher cipher, IEnumerable<Guid> collectionIds)
{
return Task.FromResult(0);
}
public Task PushSyncFolderCreateAsync(Folder folder)
{
return Task.FromResult(0);
}
public Task PushSyncFolderCreateAsync(Folder folder)
{
return Task.FromResult(0);
}
public Task PushSyncFolderDeleteAsync(Folder folder)
{
return Task.FromResult(0);
}
public Task PushSyncFolderDeleteAsync(Folder folder)
{
return Task.FromResult(0);
}
public Task PushSyncFolderUpdateAsync(Folder folder)
{
return Task.FromResult(0);
}
public Task PushSyncFolderUpdateAsync(Folder folder)
{
return Task.FromResult(0);
}
public Task PushSyncOrgKeysAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task PushSyncOrgKeysAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task PushSyncSettingsAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task PushSyncSettingsAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task PushSyncVaultAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task PushSyncVaultAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task PushLogOutAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task PushLogOutAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task PushSyncSendCreateAsync(Send send)
{
return Task.FromResult(0);
}
public Task PushSyncSendCreateAsync(Send send)
{
return Task.FromResult(0);
}
public Task PushSyncSendDeleteAsync(Send send)
{
return Task.FromResult(0);
}
public Task PushSyncSendDeleteAsync(Send send)
{
return Task.FromResult(0);
}
public Task PushSyncSendUpdateAsync(Send send)
{
return Task.FromResult(0);
}
public Task PushSyncSendUpdateAsync(Send send)
{
return Task.FromResult(0);
}
public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string identifier,
string deviceId = null)
{
return Task.FromResult(0);
}
public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string identifier,
string deviceId = null)
{
return Task.FromResult(0);
}
public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string identifier,
string deviceId = null)
{
return Task.FromResult(0);
public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string identifier,
string deviceId = null)
{
return Task.FromResult(0);
}
}
}

View File

@@ -1,27 +1,28 @@
using Bit.Core.Enums;
namespace Bit.Core.Services;
public class NoopPushRegistrationService : IPushRegistrationService
namespace Bit.Core.Services
{
public Task AddUserRegistrationOrganizationAsync(IEnumerable<string> deviceIds, string organizationId)
public class NoopPushRegistrationService : IPushRegistrationService
{
return Task.FromResult(0);
}
public Task AddUserRegistrationOrganizationAsync(IEnumerable<string> deviceIds, string organizationId)
{
return Task.FromResult(0);
}
public Task CreateOrUpdateRegistrationAsync(string pushToken, string deviceId, string userId,
string identifier, DeviceType type)
{
return Task.FromResult(0);
}
public Task CreateOrUpdateRegistrationAsync(string pushToken, string deviceId, string userId,
string identifier, DeviceType type)
{
return Task.FromResult(0);
}
public Task DeleteRegistrationAsync(string deviceId)
{
return Task.FromResult(0);
}
public Task DeleteRegistrationAsync(string deviceId)
{
return Task.FromResult(0);
}
public Task DeleteUserRegistrationOrganizationAsync(IEnumerable<string> deviceIds, string organizationId)
{
return Task.FromResult(0);
public Task DeleteUserRegistrationOrganizationAsync(IEnumerable<string> deviceIds, string organizationId)
{
return Task.FromResult(0);
}
}
}

View File

@@ -1,11 +1,12 @@
using Bit.Core.Models.Business;
namespace Bit.Core.Services;
public class NoopReferenceEventService : IReferenceEventService
namespace Bit.Core.Services
{
public Task RaiseEventAsync(ReferenceEvent referenceEvent)
public class NoopReferenceEventService : IReferenceEventService
{
return Task.CompletedTask;
public Task RaiseEventAsync(ReferenceEvent referenceEvent)
{
return Task.CompletedTask;
}
}
}

View File

@@ -1,44 +1,45 @@
using Bit.Core.Entities;
using Bit.Core.Enums;
namespace Bit.Core.Services;
public class NoopSendFileStorageService : ISendFileStorageService
namespace Bit.Core.Services
{
public FileUploadType FileUploadType => FileUploadType.Direct;
public Task UploadNewFileAsync(Stream stream, Send send, string attachmentId)
public class NoopSendFileStorageService : ISendFileStorageService
{
return Task.FromResult(0);
}
public FileUploadType FileUploadType => FileUploadType.Direct;
public Task DeleteFileAsync(Send send, string fileId)
{
return Task.FromResult(0);
}
public Task UploadNewFileAsync(Stream stream, Send send, string attachmentId)
{
return Task.FromResult(0);
}
public Task DeleteFilesForOrganizationAsync(Guid organizationId)
{
return Task.FromResult(0);
}
public Task DeleteFileAsync(Send send, string fileId)
{
return Task.FromResult(0);
}
public Task DeleteFilesForUserAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task DeleteFilesForOrganizationAsync(Guid organizationId)
{
return Task.FromResult(0);
}
public Task<string> GetSendFileDownloadUrlAsync(Send send, string fileId)
{
return Task.FromResult((string)null);
}
public Task DeleteFilesForUserAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task<string> GetSendFileUploadUrlAsync(Send send, string fileId)
{
return Task.FromResult((string)null);
}
public Task<string> GetSendFileDownloadUrlAsync(Send send, string fileId)
{
return Task.FromResult((string)null);
}
public Task<(bool, long?)> ValidateFileAsync(Send send, string fileId, long expectedFileSize, long leeway)
{
return Task.FromResult((false, default(long?)));
public Task<string> GetSendFileUploadUrlAsync(Send send, string fileId)
{
return Task.FromResult((string)null);
}
public Task<(bool, long?)> ValidateFileAsync(Send send, string fileId, long expectedFileSize, long leeway)
{
return Task.FromResult((false, default(long?)));
}
}
}