Skip to content

Commit

Permalink
Merge branch 'master' into ac/ac-1179/event-log-updates-ffc
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsalucci committed Nov 2, 2023
2 parents ed0455c + a66528c commit d5316ee
Show file tree
Hide file tree
Showing 307 changed files with 5,680 additions and 1,163 deletions.
15 changes: 10 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,15 @@ bitwarden_license/src/test/Scim.ScimTest @bitwarden/team-admin-console-dev

# Billing Team
**/*billing* @bitwarden/team-billing-dev
**/*subscription* @bitwarden/team-billing-dev
**/*stripe* @bitwarden/team-billing-dev
**/*paypal* @bitwarden/team-billing-dev
**/*braintree* @bitwarden/team-billing-dev
**/*bitpay* @bitwarden/team-billing-dev
**/*braintree* @bitwarden/team-billing-dev
**/*freshdesk* @bitwarden/team-billing-dev
**/*freshsales* @bitwarden/team-billing-dev
**/*freshsales* @bitwarden/team-billing-dev
**/*paypal* @bitwarden/team-billing-dev
**/*stripe* @bitwarden/team-billing-dev
**/*subscription* @bitwarden/team-billing-dev
**/Billing @bitwarden/team-billing-dev

# Multiple Owners
**/packages.lock.json
Directory.Build.props
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>2023.9.1</Version>
<Version>2023.10.1</Version>
<RootNamespace>Bit.$(MSBuildProjectName)</RootNamespace>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Providers.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Exceptions;
using Bit.Core.Providers.Interfaces;
using Bit.Core.Repositories;
using Bit.Core.Services;

namespace Bit.Commercial.Core.Providers;
namespace Bit.Commercial.Core.AdminConsole.Providers;

public class CreateProviderCommand : ICreateProviderCommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
using Bit.Core.Context;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Business.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
using Bit.Core.Models.Business.Provider;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Utilities;
using Microsoft.AspNetCore.DataProtection;

namespace Bit.Commercial.Core.Services;
namespace Bit.Commercial.Core.AdminConsole.Services;

public class ProviderService : IProviderService
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bit.Commercial.Core.Providers;
using Bit.Commercial.Core.Services;
using Bit.Core.Providers.Interfaces;
using Bit.Core.Services;
using Bit.Commercial.Core.AdminConsole.Providers;
using Bit.Commercial.Core.AdminConsole.Services;
using Bit.Core.AdminConsole.Providers.Interfaces;
using Bit.Core.AdminConsole.Services;
using Microsoft.Extensions.DependencyInjection;

namespace Bit.Commercial.Core.Utilities;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2628,7 +2628,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
"Core": "[2023.9.0, )",
"Core": "[2023.10.1, )",
"Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
"Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
"Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
Expand Down
4 changes: 2 additions & 2 deletions bitwarden_license/src/Scim/Controllers/v2/UsersController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Bit.Core.Enums;
using Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.Interfaces;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.OrganizationUsers.Interfaces;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Scim.Models;
Expand Down
10 changes: 5 additions & 5 deletions bitwarden_license/src/Scim/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2631,15 +2631,15 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "[2023.9.0, )",
"Core": "[2023.10.1, )",
"Dapper": "[2.0.123, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
"Core": "[2023.9.0, )",
"Core": "[2023.10.1, )",
"Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
"Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
"Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
Expand All @@ -2651,9 +2651,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "[2023.9.0, )",
"Infrastructure.Dapper": "[2023.9.0, )",
"Infrastructure.EntityFramework": "[2023.9.0, )"
"Core": "[2023.10.1, )",
"Infrastructure.Dapper": "[2023.10.1, )",
"Infrastructure.EntityFramework": "[2023.10.1, )"
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions bitwarden_license/src/Sso/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2791,15 +2791,15 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "[2023.9.0, )",
"Core": "[2023.10.1, )",
"Dapper": "[2.0.123, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
"Core": "[2023.9.0, )",
"Core": "[2023.10.1, )",
"Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
"Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
"Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
Expand All @@ -2811,9 +2811,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "[2023.9.0, )",
"Infrastructure.Dapper": "[2023.9.0, )",
"Infrastructure.EntityFramework": "[2023.9.0, )"
"Core": "[2023.10.1, )",
"Infrastructure.Dapper": "[2023.10.1, )",
"Infrastructure.EntityFramework": "[2023.10.1, )"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Reflection;
using AutoFixture;
using AutoFixture.Xunit2;
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Enums.Provider;

namespace Bit.Commercial.Core.Test.AutoFixture;
namespace Bit.Commercial.Core.Test.AdminConsole.AutoFixture;

internal class ProviderUser : ICustomization
{
Expand All @@ -18,7 +18,7 @@ public ProviderUser(ProviderUserStatusType status, ProviderUserType type)

public void Customize(IFixture fixture)
{
fixture.Customize<Bit.Core.Entities.Provider.ProviderUser>(composer => composer
fixture.Customize<Bit.Core.AdminConsole.Entities.Provider.ProviderUser>(composer => composer
.With(o => o.Type, Type)
.With(o => o.Status, Status));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
using Bit.Commercial.Core.Providers;
using Bit.Commercial.Core.AdminConsole.Providers;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.Exceptions;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
using NSubstitute;
using Xunit;

namespace Bit.Commercial.Core.Test.ProviderFeatures;
namespace Bit.Commercial.Core.Test.AdminConsole.ProviderFeatures;

[SutProviderCustomize]
public class CreateProviderCommandTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using Bit.Commercial.Core.Services;
using Bit.Commercial.Core.Test.AutoFixture;
using Bit.Commercial.Core.AdminConsole.Services;
using Bit.Commercial.Core.Test.AdminConsole.AutoFixture;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Business.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
using Bit.Core.Models.Business.Provider;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Utilities;
Expand All @@ -17,10 +18,10 @@
using NSubstitute;
using NSubstitute.ReturnsExtensions;
using Xunit;
using Provider = Bit.Core.Entities.Provider.Provider;
using ProviderUser = Bit.Core.Entities.Provider.ProviderUser;
using Provider = Bit.Core.AdminConsole.Entities.Provider.Provider;
using ProviderUser = Bit.Core.AdminConsole.Entities.Provider.ProviderUser;

namespace Bit.Commercial.Core.Test.Services;
namespace Bit.Commercial.Core.Test.AdminConsole.Services;

[SutProviderCustomize]
public class ProviderServiceTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,36 @@ await sutProvider.GetDependency<IProjectRepository>().DidNotReceiveWithAnyArgs()

[Theory]
[BitAutoData(PlanType.FamiliesAnnually2019)]
[BitAutoData(PlanType.TeamsMonthly2019)]
[BitAutoData(PlanType.TeamsAnnually2019)]
[BitAutoData(PlanType.EnterpriseMonthly2019)]
[BitAutoData(PlanType.EnterpriseAnnually2019)]
[BitAutoData(PlanType.Custom)]
[BitAutoData(PlanType.FamiliesAnnually)]
public async Task GetByOrgIdAsync_SmPlanIsNull_ThrowsBadRequest(PlanType planType,
SutProvider<MaxProjectsQuery> sutProvider, Organization organization)
{
organization.PlanType = planType;
sutProvider.GetDependency<IOrganizationRepository>().GetByIdAsync(organization.Id).Returns(organization);
sutProvider.GetDependency<IOrganizationRepository>()
.GetByIdAsync(organization.Id)
.Returns(organization);

await Assert.ThrowsAsync<BadRequestException>(
async () => await sutProvider.Sut.GetByOrgIdAsync(organization.Id, 1));

await sutProvider.GetDependency<IProjectRepository>().DidNotReceiveWithAnyArgs()
await sutProvider.GetDependency<IProjectRepository>()
.DidNotReceiveWithAnyArgs()
.GetProjectCountByOrganizationIdAsync(organization.Id);
}

[Theory]
[BitAutoData(PlanType.TeamsMonthly2019)]
[BitAutoData(PlanType.TeamsMonthly2020)]
[BitAutoData(PlanType.TeamsMonthly)]
[BitAutoData(PlanType.TeamsAnnually2019)]
[BitAutoData(PlanType.TeamsAnnually2020)]
[BitAutoData(PlanType.TeamsAnnually)]
[BitAutoData(PlanType.EnterpriseMonthly2019)]
[BitAutoData(PlanType.EnterpriseMonthly2020)]
[BitAutoData(PlanType.EnterpriseMonthly)]
[BitAutoData(PlanType.EnterpriseAnnually2019)]
[BitAutoData(PlanType.EnterpriseAnnually2020)]
[BitAutoData(PlanType.EnterpriseAnnually)]
public async Task GetByOrgIdAsync_SmNoneFreePlans_ReturnsNull(PlanType planType,
SutProvider<MaxProjectsQuery> sutProvider, Organization organization)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2667,15 +2667,15 @@
"commercial.core": {
"type": "Project",
"dependencies": {
"Core": "[2023.9.0, )"
"Core": "[2023.10.1, )"
}
},
"common": {
"type": "Project",
"dependencies": {
"AutoFixture.AutoNSubstitute": "[4.17.0, )",
"AutoFixture.Xunit2": "[4.17.0, )",
"Core": "[2023.9.0, )",
"Core": "[2023.10.1, )",
"Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )",
"Microsoft.NET.Test.Sdk": "[17.1.0, )",
"NSubstitute": "[4.3.0, )",
Expand Down Expand Up @@ -2729,8 +2729,8 @@
"dependencies": {
"AutoFixture.AutoNSubstitute": "[4.17.0, )",
"AutoFixture.Xunit2": "[4.17.0, )",
"Common": "[2023.9.0, )",
"Core": "[2023.9.0, )",
"Common": "[2023.10.1, )",
"Core": "[2023.10.1, )",
"Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )",
"Microsoft.NET.Test.Sdk": "[17.1.0, )",
"NSubstitute": "[4.3.0, )",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public class GroupsControllerTests : IClassFixture<ScimApplicationFactory>, IAsy
public GroupsControllerTests(ScimApplicationFactory factory)
{
_factory = factory;
_factory.DatabaseName = "test_database_groups";
}

public Task InitializeAsync()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public class UsersControllerTests : IClassFixture<ScimApplicationFactory>, IAsyn
public UsersControllerTests(ScimApplicationFactory factory)
{
_factory = factory;
_factory.DatabaseName = "test_database_users";
}

public Task InitializeAsync()
Expand Down
Loading

0 comments on commit d5316ee

Please sign in to comment.