diff --git a/Directory.Build.props b/Directory.Build.props index 84bd7f7be8..99525b07b2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -35,7 +35,7 @@ - 4.3.0 + 4.3.0 diff --git a/bitwarden_license/src/Commercial.Core/Services/ProviderService.cs b/bitwarden_license/src/Commercial.Core/Services/ProviderService.cs index 6eef1deebb..9a5f924246 100644 --- a/bitwarden_license/src/Commercial.Core/Services/ProviderService.cs +++ b/bitwarden_license/src/Commercial.Core/Services/ProviderService.cs @@ -17,7 +17,7 @@ namespace Bit.Commercial.Core.Services; public class ProviderService : IProviderService { - public static PlanType[] ProviderDisllowedOrganizationTypes = new[] { PlanType.Free, PlanType.FamiliesAnnually, PlanType.FamiliesAnnually2019 }; + public static PlanType[] ProviderDisallowedOrganizationTypes = new[] { PlanType.Free, PlanType.FamiliesAnnually, PlanType.FamiliesAnnually2019 }; private readonly IDataProtector _dataProtector; private readonly IMailService _mailService; @@ -493,7 +493,7 @@ public class ProviderService : IProviderService private void ThrowOnInvalidPlanType(PlanType requestedType) { - if (ProviderDisllowedOrganizationTypes.Contains(requestedType)) + if (ProviderDisallowedOrganizationTypes.Contains(requestedType)) { throw new BadRequestException($"Providers cannot manage organizations with the requested plan type ({requestedType}). Only Teams and Enterprise accounts are allowed."); } diff --git a/bitwarden_license/test/Scim.IntegrationTest/Scim.IntegrationTest.csproj b/bitwarden_license/test/Scim.IntegrationTest/Scim.IntegrationTest.csproj index 8e54d62700..5d199ddb7e 100644 --- a/bitwarden_license/test/Scim.IntegrationTest/Scim.IntegrationTest.csproj +++ b/bitwarden_license/test/Scim.IntegrationTest/Scim.IntegrationTest.csproj @@ -11,7 +11,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/bitwarden_license/test/Scim.Test/Scim.Test.csproj b/bitwarden_license/test/Scim.Test/Scim.Test.csproj index 35e4df83a7..2950103e7d 100644 --- a/bitwarden_license/test/Scim.Test/Scim.Test.csproj +++ b/bitwarden_license/test/Scim.Test/Scim.Test.csproj @@ -15,7 +15,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/dev/secrets.json.example b/dev/secrets.json.example index a45aec5e62..c6e8dcdecd 100644 --- a/dev/secrets.json.example +++ b/dev/secrets.json.example @@ -26,6 +26,6 @@ "id": "", "key": "" }, - "licenseDirectory": "" + "licenseDirectory": "" } } diff --git a/src/Api/Auth/Controllers/TwoFactorController.cs b/src/Api/Auth/Controllers/TwoFactorController.cs index 533afbbbad..0c8822219a 100644 --- a/src/Api/Auth/Controllers/TwoFactorController.cs +++ b/src/Api/Auth/Controllers/TwoFactorController.cs @@ -410,14 +410,14 @@ public class TwoFactorController : Controller } } - [Obsolete("Leaving this for backwards compatibilty on clients")] + [Obsolete("Leaving this for backwards compatibility on clients")] [HttpGet("get-device-verification-settings")] public Task GetDeviceVerificationSettings() { return Task.FromResult(new DeviceVerificationResponseModel(false, false)); } - [Obsolete("Leaving this for backwards compatibilty on clients")] + [Obsolete("Leaving this for backwards compatibility on clients")] [HttpPut("device-verification-settings")] public Task PutDeviceVerificationSettings( [FromBody] DeviceVerificationRequestModel model) diff --git a/src/Api/Auth/Models/Request/TwoFactorRequestModels.cs b/src/Api/Auth/Models/Request/TwoFactorRequestModels.cs index a9d5db2255..d946f09840 100644 --- a/src/Api/Auth/Models/Request/TwoFactorRequestModels.cs +++ b/src/Api/Auth/Models/Request/TwoFactorRequestModels.cs @@ -17,9 +17,9 @@ public class UpdateTwoFactorAuthenticatorRequestModel : SecretVerificationReques [StringLength(50)] public string Key { get; set; } - public User ToUser(User extistingUser) + public User ToUser(User existingUser) { - var providers = extistingUser.GetTwoFactorProviders(); + var providers = existingUser.GetTwoFactorProviders(); if (providers == null) { providers = new Dictionary(); @@ -34,8 +34,8 @@ public class UpdateTwoFactorAuthenticatorRequestModel : SecretVerificationReques MetaData = new Dictionary { ["Key"] = Key }, Enabled = true }); - extistingUser.SetTwoFactorProviders(providers); - return extistingUser; + existingUser.SetTwoFactorProviders(providers); + return existingUser; } } @@ -51,9 +51,9 @@ public class UpdateTwoFactorDuoRequestModel : SecretVerificationRequestModel, IV [StringLength(50)] public string Host { get; set; } - public User ToUser(User extistingUser) + public User ToUser(User existingUser) { - var providers = extistingUser.GetTwoFactorProviders(); + var providers = existingUser.GetTwoFactorProviders(); if (providers == null) { providers = new Dictionary(); @@ -73,13 +73,13 @@ public class UpdateTwoFactorDuoRequestModel : SecretVerificationRequestModel, IV }, Enabled = true }); - extistingUser.SetTwoFactorProviders(providers); - return extistingUser; + existingUser.SetTwoFactorProviders(providers); + return existingUser; } - public Organization ToOrganization(Organization extistingOrg) + public Organization ToOrganization(Organization existingOrg) { - var providers = extistingOrg.GetTwoFactorProviders(); + var providers = existingOrg.GetTwoFactorProviders(); if (providers == null) { providers = new Dictionary(); @@ -99,8 +99,8 @@ public class UpdateTwoFactorDuoRequestModel : SecretVerificationRequestModel, IV }, Enabled = true }); - extistingOrg.SetTwoFactorProviders(providers); - return extistingOrg; + existingOrg.SetTwoFactorProviders(providers); + return existingOrg; } public override IEnumerable Validate(ValidationContext validationContext) @@ -122,9 +122,9 @@ public class UpdateTwoFactorYubicoOtpRequestModel : SecretVerificationRequestMod [Required] public bool? Nfc { get; set; } - public User ToUser(User extistingUser) + public User ToUser(User existingUser) { - var providers = extistingUser.GetTwoFactorProviders(); + var providers = existingUser.GetTwoFactorProviders(); if (providers == null) { providers = new Dictionary(); @@ -147,8 +147,8 @@ public class UpdateTwoFactorYubicoOtpRequestModel : SecretVerificationRequestMod }, Enabled = true }); - extistingUser.SetTwoFactorProviders(providers); - return extistingUser; + existingUser.SetTwoFactorProviders(providers); + return existingUser; } private string FormatKey(string keyValue) @@ -205,9 +205,9 @@ public class TwoFactorEmailRequestModel : SecretVerificationRequestModel public string AuthRequestId { get; set; } // An auth session token used for obtaining email and as an authN factor for the sending of emailed 2FA OTPs. public string SsoEmail2FaSessionToken { get; set; } - public User ToUser(User extistingUser) + public User ToUser(User existingUser) { - var providers = extistingUser.GetTwoFactorProviders(); + var providers = existingUser.GetTwoFactorProviders(); if (providers == null) { providers = new Dictionary(); @@ -222,8 +222,8 @@ public class TwoFactorEmailRequestModel : SecretVerificationRequestModel MetaData = new Dictionary { ["Email"] = Email.ToLowerInvariant() }, Enabled = true }); - extistingUser.SetTwoFactorProviders(providers); - return extistingUser; + existingUser.SetTwoFactorProviders(providers); + return existingUser; } public override IEnumerable Validate(ValidationContext validationContext) diff --git a/src/Api/Controllers/OrganizationConnectionsController.cs b/src/Api/Controllers/OrganizationConnectionsController.cs index 5206cb51ae..4c04a24973 100644 --- a/src/Api/Controllers/OrganizationConnectionsController.cs +++ b/src/Api/Controllers/OrganizationConnectionsController.cs @@ -101,7 +101,7 @@ public class OrganizationConnectionsController : Controller case OrganizationConnectionType.Scim: return await CreateOrUpdateOrganizationConnectionAsync(organizationConnectionId, model); default: - throw new BadRequestException($"Unkown Organization connection Type: {model.Type}"); + throw new BadRequestException($"Unknown Organization connection Type: {model.Type}"); } } @@ -127,7 +127,7 @@ public class OrganizationConnectionsController : Controller case OrganizationConnectionType.Scim: return new OrganizationConnectionResponseModel(connection, typeof(ScimConfig)); default: - throw new BadRequestException($"Unkown Organization connection Type: {type}"); + throw new BadRequestException($"Unknown Organization connection Type: {type}"); } } diff --git a/src/Api/Controllers/ProviderUsersController.cs b/src/Api/Controllers/ProviderUsersController.cs index f88394c0b6..9dbcc49e3f 100644 --- a/src/Api/Controllers/ProviderUsersController.cs +++ b/src/Api/Controllers/ProviderUsersController.cs @@ -65,7 +65,7 @@ public class ProviderUsersController : Controller throw new NotFoundException(); } - var invite = ProviderUserInviteFactory.CreateIntialInvite(model.Emails, model.Type.Value, + var invite = ProviderUserInviteFactory.CreateInitialInvite(model.Emails, model.Type.Value, _userService.GetProperUserId(User).Value, providerId); await _providerService.InviteUserAsync(invite); } diff --git a/src/Api/Models/Request/BitPayInvoiceRequestModel.cs b/src/Api/Models/Request/BitPayInvoiceRequestModel.cs index ce1d986380..ba800cafd7 100644 --- a/src/Api/Models/Request/BitPayInvoiceRequestModel.cs +++ b/src/Api/Models/Request/BitPayInvoiceRequestModel.cs @@ -59,7 +59,7 @@ public class BitPayInvoiceRequestModel : IValidatableObject { if (!UserId.HasValue && !OrganizationId.HasValue) { - yield return new ValidationResult("User or Ooganization is required."); + yield return new ValidationResult("User or Organization is required."); } } } diff --git a/src/Api/Models/Request/DeviceVerificationRequestModel.cs b/src/Api/Models/Request/DeviceVerificationRequestModel.cs index 466010af1f..ba1b854fce 100644 --- a/src/Api/Models/Request/DeviceVerificationRequestModel.cs +++ b/src/Api/Models/Request/DeviceVerificationRequestModel.cs @@ -4,7 +4,7 @@ namespace Bit.Api.Models.Request; public class DeviceVerificationRequestModel { - [Obsolete("Leaving this for backwards compatibilty on clients")] + [Obsolete("Leaving this for backwards compatibility on clients")] [Required] public bool UnknownDeviceVerificationEnabled { get; set; } } diff --git a/src/Api/Models/Response/DeviceVerificationResponseModel.cs b/src/Api/Models/Response/DeviceVerificationResponseModel.cs index d38e65ee80..efc97c9819 100644 --- a/src/Api/Models/Response/DeviceVerificationResponseModel.cs +++ b/src/Api/Models/Response/DeviceVerificationResponseModel.cs @@ -2,7 +2,7 @@ namespace Bit.Api.Models.Response; -[Obsolete("Leaving this for backwards compatibilty on clients")] +[Obsolete("Leaving this for backwards compatibility on clients")] public class DeviceVerificationResponseModel : ResponseModel { public DeviceVerificationResponseModel(bool isDeviceVerificationSectionEnabled, bool unknownDeviceVerificationEnabled) diff --git a/src/Core/Auth/IdentityServer/TokenRetrieval.cs b/src/Core/Auth/IdentityServer/TokenRetrieval.cs index c00ff4b279..36c23506cb 100644 --- a/src/Core/Auth/IdentityServer/TokenRetrieval.cs +++ b/src/Core/Auth/IdentityServer/TokenRetrieval.cs @@ -5,7 +5,7 @@ namespace Bit.Core.Auth.IdentityServer; public static class TokenRetrieval { private static string _headerScheme = "Bearer "; - private static string _queuryScheme = "access_token"; + private static string _queryScheme = "access_token"; private static string _authHeader = "Authorization"; public static Func FromAuthorizationHeaderOrQueryString() @@ -15,7 +15,7 @@ public static class TokenRetrieval var authorization = request.Headers[_authHeader].FirstOrDefault(); if (string.IsNullOrWhiteSpace(authorization)) { - return request.Query[_queuryScheme].FirstOrDefault(); + return request.Query[_queryScheme].FirstOrDefault(); } if (authorization.StartsWith(_headerScheme, StringComparison.OrdinalIgnoreCase)) diff --git a/src/Core/Auth/Services/Implementations/EmergencyAccessService.cs b/src/Core/Auth/Services/Implementations/EmergencyAccessService.cs index 2d40dace7a..c992bb9f13 100644 --- a/src/Core/Auth/Services/Implementations/EmergencyAccessService.cs +++ b/src/Core/Auth/Services/Implementations/EmergencyAccessService.cs @@ -418,11 +418,11 @@ public class EmergencyAccessService : IEmergencyAccessService return string.IsNullOrWhiteSpace(user.Name) ? user.Email : user.Name; } - private bool IsValidRequest(EmergencyAccess availibleAccess, User requestingUser, EmergencyAccessType requestedAccessType) + private bool IsValidRequest(EmergencyAccess availableAccess, User requestingUser, EmergencyAccessType requestedAccessType) { - return availibleAccess != null && - availibleAccess.GranteeId == requestingUser.Id && - availibleAccess.Status == EmergencyAccessStatusType.RecoveryApproved && - availibleAccess.Type == requestedAccessType; + return availableAccess != null && + availableAccess.GranteeId == requestingUser.Id && + availableAccess.Status == EmergencyAccessStatusType.RecoveryApproved && + availableAccess.Type == requestedAccessType; } } diff --git a/src/Core/HostedServices/ApplicationCacheHostedService.cs b/src/Core/HostedServices/ApplicationCacheHostedService.cs index d5f4b77e3f..1bde351ee4 100644 --- a/src/Core/HostedServices/ApplicationCacheHostedService.cs +++ b/src/Core/HostedServices/ApplicationCacheHostedService.cs @@ -27,7 +27,7 @@ public class ApplicationCacheHostedService : IHostedService, IDisposable GlobalSettings globalSettings) { _topicName = globalSettings.ServiceBus.ApplicationCacheTopicName; - _subName = CoreHelpers.GetApplicationCacheServiceBusSubcriptionName(globalSettings); + _subName = CoreHelpers.GetApplicationCacheServiceBusSubscriptionName(globalSettings); _applicationCacheService = applicationCacheService as InMemoryServiceBusApplicationCacheService; _organizationRepository = organizationRepository; _logger = logger; diff --git a/src/Core/Models/Business/Provider/ProviderUserInvite.cs b/src/Core/Models/Business/Provider/ProviderUserInvite.cs index 72e87728d2..0fbe3d87c2 100644 --- a/src/Core/Models/Business/Provider/ProviderUserInvite.cs +++ b/src/Core/Models/Business/Provider/ProviderUserInvite.cs @@ -12,7 +12,7 @@ public class ProviderUserInvite public static class ProviderUserInviteFactory { - public static ProviderUserInvite CreateIntialInvite(IEnumerable inviteeEmails, ProviderUserType type, Guid invitingUserId, Guid providerId) + public static ProviderUserInvite CreateInitialInvite(IEnumerable inviteeEmails, ProviderUserType type, Guid invitingUserId, Guid providerId) { return new ProviderUserInvite { diff --git a/src/Core/Services/Implementations/AppleIapService.cs b/src/Core/Services/Implementations/AppleIapService.cs index 35cd2ac113..345a3e48d5 100644 --- a/src/Core/Services/Implementations/AppleIapService.cs +++ b/src/Core/Services/Implementations/AppleIapService.cs @@ -15,18 +15,18 @@ public class AppleIapService : IAppleIapService private readonly GlobalSettings _globalSettings; private readonly IWebHostEnvironment _hostingEnvironment; - private readonly IMetaDataRepository _metaDataRespository; + private readonly IMetaDataRepository _metaDataRepository; private readonly ILogger _logger; public AppleIapService( GlobalSettings globalSettings, IWebHostEnvironment hostingEnvironment, - IMetaDataRepository metaDataRespository, + IMetaDataRepository metaDataRepository, ILogger logger) { _globalSettings = globalSettings; _hostingEnvironment = hostingEnvironment; - _metaDataRespository = metaDataRespository; + _metaDataRepository = metaDataRepository; _logger = logger; } @@ -61,7 +61,7 @@ public class AppleIapService : IAppleIapService { throw new Exception("OriginalTransactionId is null"); } - await _metaDataRespository.UpsertAsync("AppleReceipt", originalTransactionId, + await _metaDataRepository.UpsertAsync("AppleReceipt", originalTransactionId, new Dictionary { ["Data"] = receiptStatus.GetReceiptData(), @@ -71,7 +71,7 @@ public class AppleIapService : IAppleIapService public async Task> GetReceiptAsync(string originalTransactionId) { - var receipt = await _metaDataRespository.GetAsync("AppleReceipt", originalTransactionId); + var receipt = await _metaDataRepository.GetAsync("AppleReceipt", originalTransactionId); if (receipt == null) { return null; diff --git a/src/Core/Services/Implementations/InMemoryServiceBusApplicationCacheService.cs b/src/Core/Services/Implementations/InMemoryServiceBusApplicationCacheService.cs index 1c059e4ca6..27dde6337a 100644 --- a/src/Core/Services/Implementations/InMemoryServiceBusApplicationCacheService.cs +++ b/src/Core/Services/Implementations/InMemoryServiceBusApplicationCacheService.cs @@ -18,7 +18,7 @@ public class InMemoryServiceBusApplicationCacheService : InMemoryApplicationCach GlobalSettings globalSettings) : base(organizationRepository, providerRepository) { - _subName = CoreHelpers.GetApplicationCacheServiceBusSubcriptionName(globalSettings); + _subName = CoreHelpers.GetApplicationCacheServiceBusSubscriptionName(globalSettings); _topicClient = new TopicClient(globalSettings.ServiceBus.ConnectionString, globalSettings.ServiceBus.ApplicationCacheTopicName); } diff --git a/src/Core/Services/Implementations/StripePaymentService.cs b/src/Core/Services/Implementations/StripePaymentService.cs index 79648f3358..00a2a5e646 100644 --- a/src/Core/Services/Implementations/StripePaymentService.cs +++ b/src/Core/Services/Implementations/StripePaymentService.cs @@ -527,7 +527,7 @@ public class StripePaymentService : IPaymentService } } - private async Task ChargeForNewSubscriptionAsync(ISubscriber subcriber, Stripe.Customer customer, + private async Task ChargeForNewSubscriptionAsync(ISubscriber subscriber, Stripe.Customer customer, bool createdStripeCustomer, bool stripePaymentMethod, PaymentMethodType paymentMethodType, Stripe.SubscriptionCreateOptions subCreateOptions, Braintree.Customer braintreeCustomer) { @@ -556,7 +556,7 @@ public class StripePaymentService : IPaymentService customer.Metadata.ContainsKey("btCustomerId") ? customer.Metadata["btCustomerId"] : null; if (!string.IsNullOrWhiteSpace(appleReceiptOrigTransactionId)) { - if (!subcriber.IsUser()) + if (!subscriber.IsUser()) { throw new GatewayException("In-app purchase is only allowed for users."); } @@ -577,7 +577,7 @@ public class StripePaymentService : IPaymentService if (existingTransaction == null) { appleTransaction = verifiedAppleReceipt.BuildTransactionFromLastTransaction( - PremiumPlanAppleIapPrice, subcriber.Id); + PremiumPlanAppleIapPrice, subscriber.Id); appleTransaction.Type = TransactionType.Charge; await _transactionRepository.CreateAsync(appleTransaction); } @@ -595,12 +595,12 @@ public class StripePaymentService : IPaymentService SubmitForSettlement = true, PayPal = new Braintree.TransactionOptionsPayPalRequest { - CustomField = $"{subcriber.BraintreeIdField()}:{subcriber.Id}" + CustomField = $"{subscriber.BraintreeIdField()}:{subscriber.Id}" } }, CustomFields = new Dictionary { - [subcriber.BraintreeIdField()] = subcriber.Id.ToString() + [subscriber.BraintreeIdField()] = subscriber.Id.ToString() } }); diff --git a/src/Core/Utilities/CoreHelpers.cs b/src/Core/Utilities/CoreHelpers.cs index b41f36bfb9..572b1c938d 100644 --- a/src/Core/Utilities/CoreHelpers.cs +++ b/src/Core/Utilities/CoreHelpers.cs @@ -526,7 +526,7 @@ public static class CoreHelpers return !invalid; } - public static string GetApplicationCacheServiceBusSubcriptionName(GlobalSettings globalSettings) + public static string GetApplicationCacheServiceBusSubscriptionName(GlobalSettings globalSettings) { var subName = globalSettings.ServiceBus.ApplicationCacheSubscriptionName; if (string.IsNullOrWhiteSpace(subName)) diff --git a/src/Infrastructure.EntityFramework/Repositories/CollectionCipherRepository.cs b/src/Infrastructure.EntityFramework/Repositories/CollectionCipherRepository.cs index b83b9db25f..f929b8d92b 100644 --- a/src/Infrastructure.EntityFramework/Repositories/CollectionCipherRepository.cs +++ b/src/Infrastructure.EntityFramework/Repositories/CollectionCipherRepository.cs @@ -181,7 +181,7 @@ public class CollectionCipherRepository : BaseEntityFrameworkRepository, ICollec using (var scope = ServiceScopeFactory.CreateScope()) { var dbContext = GetDatabaseContext(scope); - var availibleCollections = from c in dbContext.Collections + var availableCollections = from c in dbContext.Collections join o in dbContext.Organizations on c.OrganizationId equals o.Id join ou in dbContext.OrganizationUsers @@ -205,15 +205,15 @@ public class CollectionCipherRepository : BaseEntityFrameworkRepository, ICollec (o.Id == organizationId && o.Enabled && ou.Status == OrganizationUserStatusType.Confirmed && (ou.AccessAll || !cu.ReadOnly || g.AccessAll || !cg.ReadOnly)) select new { c, o, ou, cu, gu, g, cg }; - var count = await availibleCollections.CountAsync(); - if (await availibleCollections.CountAsync() < 1) + var count = await availableCollections.CountAsync(); + if (await availableCollections.CountAsync() < 1) { return; } var insertData = from collectionId in collectionIds from cipherId in cipherIds - where availibleCollections.Select(x => x.c.Id).Contains(collectionId) + where availableCollections.Select(x => x.c.Id).Contains(collectionId) select new Models.CollectionCipher { CollectionId = collectionId, diff --git a/src/Infrastructure.EntityFramework/Repositories/GroupRepository.cs b/src/Infrastructure.EntityFramework/Repositories/GroupRepository.cs index 0209dbf2d9..9efd5e90c3 100644 --- a/src/Infrastructure.EntityFramework/Repositories/GroupRepository.cs +++ b/src/Infrastructure.EntityFramework/Repositories/GroupRepository.cs @@ -19,11 +19,11 @@ public class GroupRepository : Repository, IGr using (var scope = ServiceScopeFactory.CreateScope()) { var dbContext = GetDatabaseContext(scope); - var availibleCollections = await ( + var availableCollections = await ( from c in dbContext.Collections where c.OrganizationId == grp.OrganizationId select c).ToListAsync(); - var filteredCollections = collections.Where(c => availibleCollections.Any(a => c.Id == a.Id)); + var filteredCollections = collections.Where(c => availableCollections.Any(a => c.Id == a.Id)); var collectionGroups = filteredCollections.Select(y => new CollectionGroup { CollectionId = y.Id, diff --git a/src/Infrastructure.EntityFramework/Repositories/OrganizationUserRepository.cs b/src/Infrastructure.EntityFramework/Repositories/OrganizationUserRepository.cs index c9ef671218..282304720f 100644 --- a/src/Infrastructure.EntityFramework/Repositories/OrganizationUserRepository.cs +++ b/src/Infrastructure.EntityFramework/Repositories/OrganizationUserRepository.cs @@ -22,11 +22,11 @@ public class OrganizationUserRepository : Repository availibleCollections.Any(a => c.Id == a.Id)); + var filteredCollections = collections.Where(c => availableCollections.Any(a => c.Id == a.Id)); var collectionUsers = filteredCollections.Select(y => new CollectionUser { CollectionId = y.Id, diff --git a/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTests.cs b/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTests.cs index 1db8115ed1..5250541a31 100644 --- a/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTests.cs +++ b/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTests.cs @@ -794,7 +794,7 @@ public class AccessPoliciesControllerTests : IClassFixture x.OrganizationUserId == owerOrgUser.Id).OrganizationUserId); + Assert.Equal(ownerOrgUser.Id, + result.UserAccessPolicies.First(x => x.OrganizationUserId == ownerOrgUser.Id).OrganizationUserId); } [Theory] diff --git a/test/Api.Test/Api.Test.csproj b/test/Api.Test/Api.Test.csproj index 564e90c225..b5f6a311c0 100644 --- a/test/Api.Test/Api.Test.csproj +++ b/test/Api.Test/Api.Test.csproj @@ -10,7 +10,7 @@ all - + all diff --git a/test/Billing.Test/Billing.Test.csproj b/test/Billing.Test/Billing.Test.csproj index 3bb1bf5be2..09252a70e1 100644 --- a/test/Billing.Test/Billing.Test.csproj +++ b/test/Billing.Test/Billing.Test.csproj @@ -16,7 +16,7 @@ all - + diff --git a/test/Common/Common.csproj b/test/Common/Common.csproj index 654165bc97..ef61e03ca5 100644 --- a/test/Common/Common.csproj +++ b/test/Common/Common.csproj @@ -5,7 +5,7 @@ - + all diff --git a/test/Core.Test/Core.Test.csproj b/test/Core.Test/Core.Test.csproj index c5093646fd..875230cfea 100644 --- a/test/Core.Test/Core.Test.csproj +++ b/test/Core.Test/Core.Test.csproj @@ -10,7 +10,7 @@ - + all diff --git a/test/Core.Test/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SetUpSponsorshipCommandTests.cs b/test/Core.Test/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SetUpSponsorshipCommandTests.cs index 5776e3e849..07920d2c88 100644 --- a/test/Core.Test/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SetUpSponsorshipCommandTests.cs +++ b/test/Core.Test/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SetUpSponsorshipCommandTests.cs @@ -65,7 +65,7 @@ public class SetUpSponsorshipCommandTests : FamiliesForEnterpriseTestsBase [Theory] [BitMemberAutoData(nameof(NonFamiliesPlanTypes))] - public async Task SetUpSponsorship_OrgNotFamiles_ThrowsBadRequest(PlanType planType, + public async Task SetUpSponsorship_OrgNotFamilies_ThrowsBadRequest(PlanType planType, OrganizationSponsorship sponsorship, Organization org, SutProvider sutProvider) { diff --git a/test/Core.Test/Services/LocalAttachmentStorageServiceTests.cs b/test/Core.Test/Services/LocalAttachmentStorageServiceTests.cs index c389b2319c..98681a19a0 100644 --- a/test/Core.Test/Services/LocalAttachmentStorageServiceTests.cs +++ b/test/Core.Test/Services/LocalAttachmentStorageServiceTests.cs @@ -183,12 +183,12 @@ public class LocalAttachmentStorageServiceTests [Theory, BitAutoData] [UserCipherCustomize] - public async Task UserCipher_DeleteAttachmentsForCipherAsync_Succes(Cipher cipher) => await DeleteAttachmentsForCipherAsync_Succes(cipher); + public async Task UserCipher_DeleteAttachmentsForCipherAsync_Success(Cipher cipher) => await DeleteAttachmentsForCipherAsync_Success(cipher); [Theory, BitAutoData] [OrganizationCipherCustomize] - public async Task OrganizationCipher_DeleteAttachmentsForCipherAsync_Succes(Cipher cipher) => await DeleteAttachmentsForCipherAsync_Succes(cipher); + public async Task OrganizationCipher_DeleteAttachmentsForCipherAsync_Success(Cipher cipher) => await DeleteAttachmentsForCipherAsync_Success(cipher); - private async Task DeleteAttachmentsForCipherAsync_Succes(Cipher cipher) + private async Task DeleteAttachmentsForCipherAsync_Success(Cipher cipher) { using (var tempDirectory = new TempDirectory()) { diff --git a/test/Core.Test/Tools/Services/SendServiceTests.cs b/test/Core.Test/Tools/Services/SendServiceTests.cs index 5ce869b822..6b59429cd8 100644 --- a/test/Core.Test/Tools/Services/SendServiceTests.cs +++ b/test/Core.Test/Tools/Services/SendServiceTests.cs @@ -429,7 +429,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_HasEnouphStorage_Success(SutProvider sutProvider, + public async void SaveFileSendAsync_HasEnoughStorage_Success(SutProvider sutProvider, Send send) { var user = new User @@ -483,7 +483,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_HasEnouphStorage_SendFileThrows_CleansUp(SutProvider sutProvider, + public async void SaveFileSendAsync_HasEnoughStorage_SendFileThrows_CleansUp(SutProvider sutProvider, Send send) { var user = new User diff --git a/test/Icons.Test/Icons.Test.csproj b/test/Icons.Test/Icons.Test.csproj index 58d4d35c33..13cfb00987 100644 --- a/test/Icons.Test/Icons.Test.csproj +++ b/test/Icons.Test/Icons.Test.csproj @@ -10,7 +10,7 @@ all - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/test/Identity.IntegrationTest/Endpoints/IdentityServerTests.cs b/test/Identity.IntegrationTest/Endpoints/IdentityServerTests.cs index 78f683d9e9..316f89647f 100644 --- a/test/Identity.IntegrationTest/Endpoints/IdentityServerTests.cs +++ b/test/Identity.IntegrationTest/Endpoints/IdentityServerTests.cs @@ -450,7 +450,7 @@ public class IdentityServerTests : IClassFixture } [Fact] - public async Task TokenEndpoint_GrantTypeClientCredentials_AsInstallation_BadInsallationId_Fails() + public async Task TokenEndpoint_GrantTypeClientCredentials_AsInstallation_BadInstallationId_Fails() { var context = await _factory.Server.PostAsync("/connect/token", new FormUrlEncodedContent(new Dictionary { diff --git a/test/Identity.IntegrationTest/Identity.IntegrationTest.csproj b/test/Identity.IntegrationTest/Identity.IntegrationTest.csproj index 02fd3d78c2..a1f96a89c0 100644 --- a/test/Identity.IntegrationTest/Identity.IntegrationTest.csproj +++ b/test/Identity.IntegrationTest/Identity.IntegrationTest.csproj @@ -11,7 +11,7 @@ - + all diff --git a/test/Identity.Test/Identity.Test.csproj b/test/Identity.Test/Identity.Test.csproj index 8efa6db9d9..f18ecee6e8 100644 --- a/test/Identity.Test/Identity.Test.csproj +++ b/test/Identity.Test/Identity.Test.csproj @@ -11,7 +11,7 @@ all - + all diff --git a/test/Infrastructure.EFIntegration.Test/Auth/Repositories/EmergencyAccessRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Auth/Repositories/EmergencyAccessRepositoryTests.cs index a17dc4b105..0bb6b0306e 100644 --- a/test/Infrastructure.EFIntegration.Test/Auth/Repositories/EmergencyAccessRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Auth/Repositories/EmergencyAccessRepositoryTests.cs @@ -24,7 +24,7 @@ public class EmergencyAccessRepositoryTests SqlRepo.UserRepository sqlUserRepo ) { - var savedEmergencyAccesss = new List(); + var savedEmergencyAccesses = new List(); foreach (var sut in suts) { var i = suts.IndexOf(sut); @@ -41,7 +41,7 @@ public class EmergencyAccessRepositoryTests sut.ClearChangeTracking(); var savedEmergencyAccess = await sut.GetByIdAsync(postEfEmergencyAccess.Id); - savedEmergencyAccesss.Add(savedEmergencyAccess); + savedEmergencyAccesses.Add(savedEmergencyAccess); } for (int j = 0; j < users.Count; j++) @@ -53,9 +53,9 @@ public class EmergencyAccessRepositoryTests emergencyAccess.GranteeId = users[0].Id; var sqlEmergencyAccess = await sqlEmergencyAccessRepo.CreateAsync(emergencyAccess); var savedSqlEmergencyAccess = await sqlEmergencyAccessRepo.GetByIdAsync(sqlEmergencyAccess.Id); - savedEmergencyAccesss.Add(savedSqlEmergencyAccess); + savedEmergencyAccesses.Add(savedSqlEmergencyAccess); - var distinctItems = savedEmergencyAccesss.Distinct(equalityComparer); + var distinctItems = savedEmergencyAccesses.Distinct(equalityComparer); Assert.True(!distinctItems.Skip(1).Any()); } } diff --git a/test/Infrastructure.EFIntegration.Test/Infrastructure.EFIntegration.Test.csproj b/test/Infrastructure.EFIntegration.Test/Infrastructure.EFIntegration.Test.csproj index abc34ea984..352e8b6824 100644 --- a/test/Infrastructure.EFIntegration.Test/Infrastructure.EFIntegration.Test.csproj +++ b/test/Infrastructure.EFIntegration.Test/Infrastructure.EFIntegration.Test.csproj @@ -9,7 +9,7 @@ - + all diff --git a/test/Infrastructure.EFIntegration.Test/Vault/AutoFixture/CipherFixtures.cs b/test/Infrastructure.EFIntegration.Test/Vault/AutoFixture/CipherFixtures.cs index 245e1dcc5c..65b4e4f6d0 100644 --- a/test/Infrastructure.EFIntegration.Test/Vault/AutoFixture/CipherFixtures.cs +++ b/test/Infrastructure.EFIntegration.Test/Vault/AutoFixture/CipherFixtures.cs @@ -52,9 +52,9 @@ internal class CipherBuilder : ISpecimenBuilder { var obj = fixture.WithAutoNSubstitutions().Create(); var cipherData = fixture.WithAutoNSubstitutions().Create(); - var cipherAttachements = fixture.WithAutoNSubstitutions().Create>(); + var cipherAttachments = fixture.WithAutoNSubstitutions().Create>(); obj.Data = JsonSerializer.Serialize(cipherData, serializerOptions); - obj.Attachments = JsonSerializer.Serialize(cipherAttachements, serializerOptions); + obj.Attachments = JsonSerializer.Serialize(cipherAttachments, serializerOptions); return obj; } @@ -64,9 +64,9 @@ internal class CipherBuilder : ISpecimenBuilder for (var i = 0; i < ciphers.Count(); i++) { var cipherData = fixture.WithAutoNSubstitutions().Create(); - var cipherAttachements = fixture.WithAutoNSubstitutions().Create>(); + var cipherAttachments = fixture.WithAutoNSubstitutions().Create>(); ciphers[i].Data = JsonSerializer.Serialize(cipherData, serializerOptions); - ciphers[i].Attachments = JsonSerializer.Serialize(cipherAttachements, serializerOptions); + ciphers[i].Attachments = JsonSerializer.Serialize(cipherAttachments, serializerOptions); } return ciphers; diff --git a/test/Infrastructure.IntegrationTest/Vault/Repositories/CipherRepositoryTests.cs b/test/Infrastructure.IntegrationTest/Vault/Repositories/CipherRepositoryTests.cs index 95c1085ac8..b95eb76110 100644 --- a/test/Infrastructure.IntegrationTest/Vault/Repositories/CipherRepositoryTests.cs +++ b/test/Infrastructure.IntegrationTest/Vault/Repositories/CipherRepositoryTests.cs @@ -43,7 +43,7 @@ public class CipherRepositoryTests } [DatabaseTheory, DatabaseData] - public async Task CreateAsync_UpdateWithCollecitons_Works( + public async Task CreateAsync_UpdateWithCollections_Works( IUserRepository userRepository, IOrganizationRepository organizationRepository, IOrganizationUserRepository organizationUserRepository,