diff --git a/.github/renovate.json b/.github/renovate.json index ac1b243912..b8cafdfc01 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -8,8 +8,9 @@ ":pinAllExceptPeerDependencies", ":prConcurrentLimit10", ":rebaseStalePrs", - "schedule:weekends", - ":separateMajorReleases" + ":separateMajorReleases", + "group:monorepos", + "schedule:weekends" ], "enabledManagers": [ "dockerfile", @@ -18,6 +19,8 @@ "npm", "nuget" ], + "commitMessagePrefix": "[deps]:", + "commitMessageTopic": "{{depName}}", "packageRules": [ { "groupName": "dockerfile minor", @@ -35,14 +38,139 @@ "matchUpdateTypes": ["minor", "patch"] }, { - "groupName": "npm minor", - "matchManagers": ["npm"], - "matchUpdateTypes": ["minor", "patch"] + "matchPackageNames": ["DnsClient", "Quartz"], + "description": "Admin Console owned dependencies", + "commitMessagePrefix": "[deps] AC:", + "reviewers": ["team:team-admin-console-dev"] }, { - "groupName": "nuget minor", - "matchManagers": ["nuget"], - "matchUpdateTypes": ["minor", "patch"] + "matchFileNames": ["src/Admin/package.json", "src/Sso/package.json"], + "description": "Admin & SSO npm packages", + "reviewers": ["team:team-auth-dev"] + }, + { + "matchPackageNames": [ + "AspNetCoreRateLimit", + "AspNetCoreRateLimit.Redis", + "Azure.Extensions.AspNetCore.DataProtection.Blobs", + "Azure.Messaging.EventGrid", + "Azure.Messaging.ServiceBus", + "Azure.Storage.Blobs", + "Azure.Storage.Queues", + "Fido2.AspNet", + "IdentityServer4", + "IdentityServer4.AccessTokenValidation", + "Microsoft.Azure.Cosmos", + "Microsoft.Azure.Cosmos.Table", + "Microsoft.Extensions.Caching.StackExchangeRedis", + "Microsoft.Extensions.Identity.Stores", + "Otp.NET", + "Sustainsys.Saml2.AspNetCore2", + "YubicoDotNetClient" + ], + "description": "Auth owned dependencies", + "commitMessagePrefix": "[deps] Auth:", + "reviewers": ["team:team-auth-dev"] + }, + { + "matchPackageNames": [ + "AutoFixture.AutoNSubstitute", + "AutoFixture.Xunit2", + "BenchmarkDotNet", + "BitPay.Light", + "Braintree", + "coverlet.collector", + "FluentAssertions", + "Kralizek.AutoFixture.Extensions.MockHttp", + "Microsoft.AspNetCore.Mvc.Testing", + "Microsoft.Extensions.Logging", + "Microsoft.Extensions.Logging.Console", + "Newtonsoft.Json", + "NSubstitute", + "Sentry.Serilog", + "Serilog.AspNetCore", + "Serilog.Extensions.Logging", + "Serilog.Extensions.Logging.File", + "Serilog.Sinks.AzureCosmosDB", + "Serilog.Sinks.SyslogMessages", + "Stripe.net", + "Swashbuckle.AspNetCore", + "Swashbuckle.AspNetCore.SwaggerGen", + "xunit", + "xunit.runner.visualstudio" + ], + "description": "Billing owned dependencies", + "commitMessagePrefix": "[deps] Billing:", + "reviewers": ["team:team-billing-dev"] + }, + { + "matchPackageNames": ["CommandDotNet", "dbup-sqlserver", "YamlDotNet"], + "description": "DevOps owned dependencies", + "commitMessagePrefix": "[deps] DevOps:", + "reviewers": ["team:team-devops"] + }, + { + "matchPackageNames": [ + "Microsoft.AspNetCore.Authentication.JwtBearer", + "Microsoft.AspNetCore.Http", + "Microsoft.Data.SqlClient" + ], + "description": "Platform owned dependencies", + "commitMessagePrefix": "[deps] Platform:", + "reviewers": ["team:team-platform-dev"] + }, + { + "matchPackageNames": [ + "Dapper", + "linq2db.EntityFrameworkCore", + "Microsoft.EntityFrameworkCore.Design", + "Microsoft.EntityFrameworkCore.InMemory", + "Microsoft.EntityFrameworkCore.Relational", + "Microsoft.EntityFrameworkCore.Sqlite", + "Microsoft.EntityFrameworkCore.SqlServer", + "Npgsql.EntityFrameworkCore.PostgreSQL", + "Pomelo.EntityFrameworkCore.MySql" + ], + "description": "Secrets Manager owned dependencies", + "commitMessagePrefix": "[deps] SM:", + "reviewers": ["team:team-secrets-manager-dev"] + }, + { + "matchPackageNames": [ + "AutoMapper.Extensions.Microsoft.DependencyInjection", + "AWSSDK.SimpleEmail", + "AWSSDK.SQS", + "Handlebars.Net", + "LaunchDarkly.ServerSdk", + "MailKit", + "Microsoft.AspNetCore.SignalR.Protocols.MessagePack", + "Microsoft.AspNetCore.SignalR.StackExchangeRedis", + "Microsoft.Azure.NotificationHubs", + "Microsoft.Extensions.Configuration", + "Microsoft.Extensions.Configuration.EnvironmentVariables", + "Microsoft.Extensions.Configuration.UserSecrets", + "Microsoft.Extensions.DependencyInjection", + "Microsoft.Extensions.DependencyInjection.Abstractions", + "SendGrid" + ], + "description": "Tools owned dependencies", + "commitMessagePrefix": "[deps] Tools:", + "reviewers": ["team:team-tools-dev"] + }, + { + "matchPackageNames": [ + "AngleSharp", + "AspNetCore.HealthChecks.AzureServiceBus", + "AspNetCore.HealthChecks.AzureStorage", + "AspNetCore.HealthChecks.Network", + "AspNetCore.HealthChecks.Redis", + "AspNetCore.HealthChecks.SendGrid", + "AspNetCore.HealthChecks.SqlServer", + "AspNetCore.HealthChecks.Uris" + ], + "description": "Vault owned dependencies", + "commitMessagePrefix": "[deps] Vault:", + "reviewers": ["team:team-vault-dev"] } ], "force": { diff --git a/Directory.Build.props b/Directory.Build.props index 7a21020683..c915ffaaea 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ net6.0 - 2023.10.0 + 2023.10.1 Bit.$(MSBuildProjectName) true enable diff --git a/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json b/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json index 6d5d4aab2e..c230392f01 100644 --- a/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json +++ b/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json @@ -2628,7 +2628,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", diff --git a/bitwarden_license/src/Scim/packages.lock.json b/bitwarden_license/src/Scim/packages.lock.json index fdd580c592..722ede68b8 100644 --- a/bitwarden_license/src/Scim/packages.lock.json +++ b/bitwarden_license/src/Scim/packages.lock.json @@ -2631,7 +2631,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2639,7 +2639,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2651,9 +2651,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/bitwarden_license/src/Sso/packages.lock.json b/bitwarden_license/src/Sso/packages.lock.json index 56c0b02b96..59724fbae9 100644 --- a/bitwarden_license/src/Sso/packages.lock.json +++ b/bitwarden_license/src/Sso/packages.lock.json @@ -2791,7 +2791,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2799,7 +2799,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2811,9 +2811,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/Projects/MaxProjectsQueryTests.cs b/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/Projects/MaxProjectsQueryTests.cs index 58c944e8eb..030e31d249 100644 --- a/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/Projects/MaxProjectsQueryTests.cs +++ b/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/Projects/MaxProjectsQueryTests.cs @@ -55,6 +55,7 @@ public class MaxProjectsQueryTests [BitAutoData(PlanType.TeamsAnnually2019)] [BitAutoData(PlanType.TeamsAnnually2020)] [BitAutoData(PlanType.TeamsAnnually)] + [BitAutoData(PlanType.TeamsStarter)] [BitAutoData(PlanType.EnterpriseMonthly2019)] [BitAutoData(PlanType.EnterpriseMonthly2020)] [BitAutoData(PlanType.EnterpriseMonthly)] diff --git a/bitwarden_license/test/Commercial.Core.Test/packages.lock.json b/bitwarden_license/test/Commercial.Core.Test/packages.lock.json index 09baa4bb69..205a8205c7 100644 --- a/bitwarden_license/test/Commercial.Core.Test/packages.lock.json +++ b/bitwarden_license/test/Commercial.Core.Test/packages.lock.json @@ -2667,7 +2667,7 @@ "commercial.core": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )" + "Core": "[2023.10.1, )" } }, "common": { @@ -2675,7 +2675,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", @@ -2729,8 +2729,8 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Common": "[2023.10.0, )", - "Core": "[2023.10.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, )", diff --git a/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json b/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json index d085a60013..3c292e2a4a 100644 --- a/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json +++ b/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json @@ -2981,7 +2981,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", @@ -3033,15 +3033,15 @@ "identity": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )", + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )", "Swashbuckle.AspNetCore.SwaggerGen": "[6.5.0, )" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -3049,7 +3049,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -3061,8 +3061,8 @@ "integrationtestcommon": { "type": "Project", "dependencies": { - "Common": "[2023.10.0, )", - "Identity": "[2023.10.0, )", + "Common": "[2023.10.1, )", + "Identity": "[2023.10.1, )", "Microsoft.AspNetCore.Mvc.Testing": "[6.0.5, )", "Microsoft.Extensions.Configuration": "[6.0.1, )" } @@ -3070,16 +3070,16 @@ "scim": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/bitwarden_license/test/Scim.Test/packages.lock.json b/bitwarden_license/test/Scim.Test/packages.lock.json index d217e5194e..f57a9109f1 100644 --- a/bitwarden_license/test/Scim.Test/packages.lock.json +++ b/bitwarden_license/test/Scim.Test/packages.lock.json @@ -2834,7 +2834,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", @@ -2886,7 +2886,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2894,7 +2894,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2906,16 +2906,16 @@ "scim": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/src/Admin/Views/Shared/_OrganizationForm.cshtml b/src/Admin/Views/Shared/_OrganizationForm.cshtml index 9e1b488b17..76502ff75b 100644 --- a/src/Admin/Views/Shared/_OrganizationForm.cshtml +++ b/src/Admin/Views/Shared/_OrganizationForm.cshtml @@ -82,7 +82,7 @@ @{ var planTypes = Enum.GetValues() - .Where(p => Model.Provider == null || p is >= PlanType.TeamsMonthly and <= PlanType.EnterpriseAnnually) + .Where(p => Model.Provider == null || p is >= PlanType.TeamsMonthly and <= PlanType.TeamsStarter) .Select(e => new SelectListItem { Value = ((int)e).ToString(), diff --git a/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml b/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml index 5871977fea..fc527750aa 100644 --- a/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml +++ b/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml @@ -74,6 +74,7 @@ case '@((byte)PlanType.TeamsAnnually2020)': case '@((byte)PlanType.TeamsMonthly)': case '@((byte)PlanType.TeamsAnnually)': + case '@((byte)PlanType.TeamsStarter)': document.getElementById('@(nameof(Model.UsePolicies))').checked = false; document.getElementById('@(nameof(Model.UseSso))').checked = false; document.getElementById('@(nameof(Model.UseGroups))').checked = true; diff --git a/src/Admin/packages.lock.json b/src/Admin/packages.lock.json index c0cfc4e303..d714421eee 100644 --- a/src/Admin/packages.lock.json +++ b/src/Admin/packages.lock.json @@ -2792,15 +2792,15 @@ "commercial.core": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )" + "Core": "[2023.10.1, )" } }, "commercial.infrastructure.entityframework": { "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } }, "core": { @@ -2848,7 +2848,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2856,7 +2856,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2868,7 +2868,7 @@ "migrator": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.Extensions.Logging": "[6.0.0, )", "dbup-sqlserver": "[5.0.8, )" } @@ -2876,30 +2876,30 @@ "mysqlmigrations": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } }, "postgresmigrations": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } }, "sqlitemigrations": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/src/Api/Controllers/PlansController.cs b/src/Api/Controllers/PlansController.cs index 14992bd97b..09aa0ba1e4 100644 --- a/src/Api/Controllers/PlansController.cs +++ b/src/Api/Controllers/PlansController.cs @@ -33,9 +33,12 @@ public class PlansController : Controller public ListResponseModel Get() { var plansUpgradeIsEnabled = _featureService.IsEnabled(FeatureFlagKeys.BillingPlansUpgrade, _currentContext); - var data = StaticStore.Plans; - var responses = data - .Where(plan => plansUpgradeIsEnabled || plan.Type <= PlanType.EnterpriseAnnually2020) + var teamsStarterPlanIsEnabled = _featureService.IsEnabled(FeatureFlagKeys.BillingStarterPlan, _currentContext); + var responses = StaticStore.Plans + // If plans upgrade is disabled, return only the original plans. Otherwise, return everything + .Where(plan => plansUpgradeIsEnabled || plan.Type <= PlanType.EnterpriseAnnually2020 || plan.Type == PlanType.TeamsStarter) + // If teams starter is disabled, don't return that plan, otherwise return everything + .Where(plan => teamsStarterPlanIsEnabled || plan.Product != ProductType.TeamsStarter) .Select(plan => { if (!plansUpgradeIsEnabled && plan.Type is <= PlanType.EnterpriseAnnually2020 and >= PlanType.TeamsMonthly2020) diff --git a/src/Api/packages.lock.json b/src/Api/packages.lock.json index 4b08094479..8d05794c47 100644 --- a/src/Api/packages.lock.json +++ b/src/Api/packages.lock.json @@ -2772,15 +2772,15 @@ "commercial.core": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )" + "Core": "[2023.10.1, )" } }, "commercial.infrastructure.entityframework": { "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } }, "core": { @@ -2828,7 +2828,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2836,7 +2836,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2848,9 +2848,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/src/Billing/Controllers/FreshsalesController.cs b/src/Billing/Controllers/FreshsalesController.cs index a66edd6ca6..545f285e08 100644 --- a/src/Billing/Controllers/FreshsalesController.cs +++ b/src/Billing/Controllers/FreshsalesController.cs @@ -164,6 +164,7 @@ public class FreshsalesController : Controller case PlanType.TeamsMonthly: case PlanType.TeamsMonthly2020: case PlanType.TeamsMonthly2019: + case PlanType.TeamsStarter: planName = "Teams"; return true; case PlanType.EnterpriseAnnually: diff --git a/src/Billing/packages.lock.json b/src/Billing/packages.lock.json index fdd580c592..722ede68b8 100644 --- a/src/Billing/packages.lock.json +++ b/src/Billing/packages.lock.json @@ -2631,7 +2631,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2639,7 +2639,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2651,9 +2651,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/src/Core/Constants.cs b/src/Core/Constants.cs index e32b0f4ce4..6dbe8541d9 100644 --- a/src/Core/Constants.cs +++ b/src/Core/Constants.cs @@ -64,6 +64,7 @@ public static class FeatureFlagKeys public const string AutofillOverlay = "autofill-overlay"; public const string ItemShare = "item-share"; public const string BillingPlansUpgrade = "billing-plans-upgrade"; + public const string BillingStarterPlan = "billing-starter-plan"; public static List GetAllKeys() { diff --git a/src/Core/Enums/PlanType.cs b/src/Core/Enums/PlanType.cs index cb88e83601..57fcd3090e 100644 --- a/src/Core/Enums/PlanType.cs +++ b/src/Core/Enums/PlanType.cs @@ -36,4 +36,6 @@ public enum PlanType : byte EnterpriseMonthly = 14, [Display(Name = "Enterprise (Annually)")] EnterpriseAnnually = 15, + [Display(Name = "Teams Starter")] + TeamsStarter = 16, } diff --git a/src/Core/Enums/ProductType.cs b/src/Core/Enums/ProductType.cs index 1e443f56f9..9d6e0e2bbc 100644 --- a/src/Core/Enums/ProductType.cs +++ b/src/Core/Enums/ProductType.cs @@ -12,5 +12,7 @@ public enum ProductType : byte Teams = 2, [Display(Name = "Enterprise")] Enterprise = 3, + [Display(Name = "Teams Starter")] + TeamsStarter = 4, } diff --git a/src/Core/Models/Business/SubscriptionCreateOptions.cs b/src/Core/Models/Business/SubscriptionCreateOptions.cs index 0ea4c4c0b5..17faef40a4 100644 --- a/src/Core/Models/Business/SubscriptionCreateOptions.cs +++ b/src/Core/Models/Business/SubscriptionCreateOptions.cs @@ -4,10 +4,18 @@ using Plan = Bit.Core.Models.StaticStore.Plan; namespace Bit.Core.Models.Business; -public class OrganizationSubscriptionOptionsBase : Stripe.SubscriptionCreateOptions +public class OrganizationSubscriptionOptionsBase : SubscriptionCreateOptions { - public OrganizationSubscriptionOptionsBase(Organization org, StaticStore.Plan plan, TaxInfo taxInfo, int additionalSeats, - int additionalStorageGb, bool premiumAccessAddon, int additionalSmSeats, int additionalServiceAccounts) + public OrganizationSubscriptionOptionsBase( + Organization org, + Plan plan, + TaxInfo taxInfo, + int additionalSeats, + int additionalStorageGb, + bool premiumAccessAddon, + bool useSecretsManager, + int additionalSmSeats, + int additionalServiceAccounts) { Items = new List(); Metadata = new Dictionary @@ -17,7 +25,7 @@ public class OrganizationSubscriptionOptionsBase : Stripe.SubscriptionCreateOpti AddPlanIdToSubscription(plan); - if (org.UseSecretsManager) + if (useSecretsManager) { AddSecretsManagerSeat(plan, additionalSmSeats); AddServiceAccount(plan, additionalServiceAccounts); @@ -38,7 +46,10 @@ public class OrganizationSubscriptionOptionsBase : Stripe.SubscriptionCreateOpti if (additionalSmSeats > 0 && plan.SecretsManager.StripeSeatPlanId != null) { Items.Add(new SubscriptionItemOptions - { Plan = plan.SecretsManager.StripeSeatPlanId, Quantity = additionalSmSeats }); + { + Plan = plan.SecretsManager.StripeSeatPlanId, + Quantity = additionalSmSeats + }); } } @@ -47,11 +58,14 @@ public class OrganizationSubscriptionOptionsBase : Stripe.SubscriptionCreateOpti if (additionalSeats > 0 && plan.PasswordManager.StripeSeatPlanId != null) { Items.Add(new SubscriptionItemOptions - { Plan = plan.PasswordManager.StripeSeatPlanId, Quantity = additionalSeats }); + { + Plan = plan.PasswordManager.StripeSeatPlanId, + Quantity = additionalSeats + }); } } - private void AddServiceAccount(StaticStore.Plan plan, int additionalServiceAccounts) + private void AddServiceAccount(Plan plan, int additionalServiceAccounts) { if (additionalServiceAccounts > 0 && plan.SecretsManager.StripeServiceAccountPlanId != null) { @@ -63,7 +77,7 @@ public class OrganizationSubscriptionOptionsBase : Stripe.SubscriptionCreateOpti } } - private void AddAdditionalStorage(StaticStore.Plan plan, int additionalStorageGb) + private void AddAdditionalStorage(Plan plan, int additionalStorageGb) { if (additionalStorageGb > 0) { @@ -75,19 +89,27 @@ public class OrganizationSubscriptionOptionsBase : Stripe.SubscriptionCreateOpti } } - private void AddPremiumAccessAddon(StaticStore.Plan plan, bool premiumAccessAddon) + private void AddPremiumAccessAddon(Plan plan, bool premiumAccessAddon) { if (premiumAccessAddon && plan.PasswordManager.StripePremiumAccessPlanId != null) { - Items.Add(new SubscriptionItemOptions { Plan = plan.PasswordManager.StripePremiumAccessPlanId, Quantity = 1 }); + Items.Add(new SubscriptionItemOptions + { + Plan = plan.PasswordManager.StripePremiumAccessPlanId, + Quantity = 1 + }); } } - private void AddPlanIdToSubscription(StaticStore.Plan plan) + private void AddPlanIdToSubscription(Plan plan) { if (plan.PasswordManager.StripePlanId != null) { - Items.Add(new SubscriptionItemOptions { Plan = plan.PasswordManager.StripePlanId, Quantity = 1 }); + Items.Add(new SubscriptionItemOptions + { + Plan = plan.PasswordManager.StripePlanId, + Quantity = 1 + }); } } } @@ -95,11 +117,18 @@ public class OrganizationSubscriptionOptionsBase : Stripe.SubscriptionCreateOpti public class OrganizationPurchaseSubscriptionOptions : OrganizationSubscriptionOptionsBase { public OrganizationPurchaseSubscriptionOptions( - Organization org, StaticStore.Plan plan, - TaxInfo taxInfo, int additionalSeats, - int additionalStorageGb, bool premiumAccessAddon, - int additionalSmSeats, int additionalServiceAccounts) : - base(org, plan, taxInfo, additionalSeats, additionalStorageGb, premiumAccessAddon, additionalSmSeats, additionalServiceAccounts) + Organization org, + Plan plan, + TaxInfo taxInfo, + int additionalSeats, + int additionalStorageGb, + bool premiumAccessAddon, + int additionalSmSeats, + int additionalServiceAccounts) : + base(org, plan, taxInfo, additionalSeats, + additionalStorageGb, premiumAccessAddon, + org.UseSecretsManager, additionalSmSeats, + additionalServiceAccounts) { OffSession = true; TrialPeriodDays = plan.TrialPeriodDays; @@ -109,11 +138,14 @@ public class OrganizationPurchaseSubscriptionOptions : OrganizationSubscriptionO public class OrganizationUpgradeSubscriptionOptions : OrganizationSubscriptionOptionsBase { public OrganizationUpgradeSubscriptionOptions( - string customerId, Organization org, - StaticStore.Plan plan, OrganizationUpgrade upgrade) : - base(org, plan, upgrade.TaxInfo, upgrade.AdditionalSeats, upgrade.AdditionalStorageGb, - upgrade.PremiumAccessAddon, upgrade.AdditionalSmSeats.GetValueOrDefault(), - upgrade.AdditionalServiceAccounts.GetValueOrDefault()) + string customerId, + Organization org, + Plan plan, + OrganizationUpgrade upgrade) : + base(org, plan, upgrade.TaxInfo, upgrade.AdditionalSeats, + upgrade.AdditionalStorageGb, upgrade.PremiumAccessAddon, + upgrade.UseSecretsManager, upgrade.AdditionalSmSeats.GetValueOrDefault(), + upgrade.AdditionalServiceAccounts.GetValueOrDefault()) { Customer = customerId; } diff --git a/src/Core/Models/StaticStore/Plans/TeamsStarterPlan.cs b/src/Core/Models/StaticStore/Plans/TeamsStarterPlan.cs new file mode 100644 index 0000000000..1b9b1b876a --- /dev/null +++ b/src/Core/Models/StaticStore/Plans/TeamsStarterPlan.cs @@ -0,0 +1,70 @@ +using Bit.Core.Enums; + +namespace Bit.Core.Models.StaticStore.Plans; + +public record TeamsStarterPlan : Plan +{ + public TeamsStarterPlan() + { + Type = PlanType.TeamsStarter; + Product = ProductType.TeamsStarter; + Name = "Teams (Starter)"; + NameLocalizationKey = "planNameTeamsStarter"; + DescriptionLocalizationKey = "planDescTeams"; + CanBeUsedByBusiness = true; + + TrialPeriodDays = 7; + + HasGroups = true; + HasDirectory = true; + HasEvents = true; + HasTotp = true; + Has2fa = true; + HasApi = true; + UsersGetPremium = true; + + UpgradeSortOrder = 2; + DisplaySortOrder = 2; + + PasswordManager = new TeamsStarterPasswordManagerFeatures(); + SecretsManager = new TeamsStarterSecretsManagerFeatures(); + } + + private record TeamsStarterSecretsManagerFeatures : SecretsManagerPlanFeatures + { + public TeamsStarterSecretsManagerFeatures() + { + BaseSeats = 0; + BasePrice = 0; + BaseServiceAccount = 50; + + HasAdditionalSeatsOption = true; + HasAdditionalServiceAccountOption = true; + + AllowSeatAutoscale = true; + AllowServiceAccountsAutoscale = true; + + StripeSeatPlanId = "secrets-manager-teams-seat-monthly"; + StripeServiceAccountPlanId = "secrets-manager-service-account-monthly"; + SeatPrice = 7; + AdditionalPricePerServiceAccount = 0.5M; + } + } + + private record TeamsStarterPasswordManagerFeatures : PasswordManagerPlanFeatures + { + public TeamsStarterPasswordManagerFeatures() + { + BaseSeats = 10; + BaseStorageGb = 1; + BasePrice = 20; + + MaxSeats = 10; + + HasAdditionalStorageOption = true; + + StripePlanId = "teams-org-starter"; + AdditionalStoragePricePerGb = 0.5M; + } + } +} diff --git a/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpdateSecretsManagerSubscriptionCommand.cs b/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpdateSecretsManagerSubscriptionCommand.cs index 30ccbe5789..ddfdee3f62 100644 --- a/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpdateSecretsManagerSubscriptionCommand.cs +++ b/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpdateSecretsManagerSubscriptionCommand.cs @@ -243,6 +243,12 @@ public class UpdateSecretsManagerSubscriptionCommand : IUpdateSecretsManagerSubs "You cannot decrease your subscription below your current occupied seat count."); } } + + // Check that SM seats aren't greater than password manager seats + if (organization.Seats < update.SmSeats.Value) + { + throw new BadRequestException("You cannot have more Secrets Manager seats than Password Manager seats."); + } } private async Task ValidateSmServiceAccountsUpdateAsync(SecretsManagerSubscriptionUpdate update) diff --git a/src/Core/Services/Implementations/OrganizationService.cs b/src/Core/Services/Implementations/OrganizationService.cs index 73eb98cd0c..e7275a6d26 100644 --- a/src/Core/Services/Implementations/OrganizationService.cs +++ b/src/Core/Services/Implementations/OrganizationService.cs @@ -1811,9 +1811,9 @@ public class OrganizationService : IOrganizationService private static void ValidatePlan(Models.StaticStore.Plan plan, int additionalSeats, string productType) { - if (plan is not { LegacyYear: null }) + if (plan is null) { - throw new BadRequestException($"Invalid {productType} plan selected."); + throw new BadRequestException($"{productType} Plan was null."); } if (plan.Disabled) @@ -1829,6 +1829,11 @@ public class OrganizationService : IOrganizationService public void ValidatePasswordManagerPlan(Models.StaticStore.Plan plan, OrganizationUpgrade upgrade) { + if (plan is not { LegacyYear: null }) + { + throw new BadRequestException("Invalid Password Manager plan selected."); + } + ValidatePlan(plan, upgrade.AdditionalSeats, "Password Manager"); if (plan.PasswordManager.BaseSeats + upgrade.AdditionalSeats <= 0) @@ -1888,7 +1893,10 @@ public class OrganizationService : IOrganizationService throw new BadRequestException("Plan does not allow additional Service Accounts."); } - if (upgrade.AdditionalSmSeats.GetValueOrDefault() > upgrade.AdditionalSeats) + if ((plan.Product == ProductType.TeamsStarter && + upgrade.AdditionalSmSeats.GetValueOrDefault() > plan.PasswordManager.BaseSeats) || + (plan.Product != ProductType.TeamsStarter && + upgrade.AdditionalSmSeats.GetValueOrDefault() > upgrade.AdditionalSeats)) { throw new BadRequestException("You cannot have more Secrets Manager seats than Password Manager seats."); } diff --git a/src/Core/Utilities/StaticStore.cs b/src/Core/Utilities/StaticStore.cs index 11052a4468..dcf63df138 100644 --- a/src/Core/Utilities/StaticStore.cs +++ b/src/Core/Utilities/StaticStore.cs @@ -106,10 +106,11 @@ public static class StaticStore GlobalDomains.Add(GlobalEquivalentDomainsType.Pinterest, new List { "pinterest.com", "pinterest.com.au", "pinterest.cl", "pinterest.de", "pinterest.dk", "pinterest.es", "pinterest.fr", "pinterest.co.uk", "pinterest.jp", "pinterest.co.kr", "pinterest.nz", "pinterest.pt", "pinterest.se" }); #endregion - Plans = new List + Plans = new List { new EnterprisePlan(true), new EnterprisePlan(false), + new TeamsStarterPlan(), new TeamsPlan(true), new TeamsPlan(false), @@ -130,7 +131,7 @@ public static class StaticStore } public static IDictionary> GlobalDomains { get; set; } - public static IEnumerable Plans { get; } + public static IEnumerable Plans { get; } public static IEnumerable SponsoredPlans { get; set; } = new[] { new SponsoredPlan diff --git a/src/Events/packages.lock.json b/src/Events/packages.lock.json index fdd580c592..722ede68b8 100644 --- a/src/Events/packages.lock.json +++ b/src/Events/packages.lock.json @@ -2631,7 +2631,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2639,7 +2639,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2651,9 +2651,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/src/EventsProcessor/packages.lock.json b/src/EventsProcessor/packages.lock.json index fdd580c592..722ede68b8 100644 --- a/src/EventsProcessor/packages.lock.json +++ b/src/EventsProcessor/packages.lock.json @@ -2631,7 +2631,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2639,7 +2639,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2651,9 +2651,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/src/Icons/packages.lock.json b/src/Icons/packages.lock.json index ecdd1a637c..a5c16d3f74 100644 --- a/src/Icons/packages.lock.json +++ b/src/Icons/packages.lock.json @@ -2640,7 +2640,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2648,7 +2648,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2660,9 +2660,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/src/Identity/packages.lock.json b/src/Identity/packages.lock.json index 4590629957..375aef79d5 100644 --- a/src/Identity/packages.lock.json +++ b/src/Identity/packages.lock.json @@ -2653,7 +2653,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2661,7 +2661,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2673,9 +2673,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/src/Notifications/packages.lock.json b/src/Notifications/packages.lock.json index bc7d4cf691..69046d6f34 100644 --- a/src/Notifications/packages.lock.json +++ b/src/Notifications/packages.lock.json @@ -2681,7 +2681,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2689,7 +2689,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2701,9 +2701,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/src/SharedWeb/packages.lock.json b/src/SharedWeb/packages.lock.json index c51bfa261e..50125960fa 100644 --- a/src/SharedWeb/packages.lock.json +++ b/src/SharedWeb/packages.lock.json @@ -2631,7 +2631,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2639,7 +2639,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", diff --git a/test/Api.IntegrationTest/packages.lock.json b/test/Api.IntegrationTest/packages.lock.json index 5ee1b1a56c..1632bc8869 100644 --- a/test/Api.IntegrationTest/packages.lock.json +++ b/test/Api.IntegrationTest/packages.lock.json @@ -3138,25 +3138,25 @@ "AspNetCore.HealthChecks.SqlServer": "[6.0.2, )", "AspNetCore.HealthChecks.Uris": "[6.0.3, )", "Azure.Messaging.EventGrid": "[4.10.0, )", - "Commercial.Core": "[2023.10.0, )", - "Commercial.Infrastructure.EntityFramework": "[2023.10.0, )", - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )", + "Commercial.Core": "[2023.10.1, )", + "Commercial.Infrastructure.EntityFramework": "[2023.10.1, )", + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )", "Swashbuckle.AspNetCore": "[6.5.0, )" } }, "commercial.core": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )" + "Core": "[2023.10.1, )" } }, "commercial.infrastructure.entityframework": { "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } }, "common": { @@ -3164,7 +3164,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", @@ -3216,15 +3216,15 @@ "identity": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )", + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )", "Swashbuckle.AspNetCore.SwaggerGen": "[6.5.0, )" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -3232,7 +3232,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -3244,8 +3244,8 @@ "integrationtestcommon": { "type": "Project", "dependencies": { - "Common": "[2023.10.0, )", - "Identity": "[2023.10.0, )", + "Common": "[2023.10.1, )", + "Identity": "[2023.10.1, )", "Microsoft.AspNetCore.Mvc.Testing": "[6.0.5, )", "Microsoft.Extensions.Configuration": "[6.0.1, )" } @@ -3253,9 +3253,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/test/Api.Test/packages.lock.json b/test/Api.Test/packages.lock.json index 84e63259c4..a7b6197016 100644 --- a/test/Api.Test/packages.lock.json +++ b/test/Api.Test/packages.lock.json @@ -3015,25 +3015,25 @@ "AspNetCore.HealthChecks.SqlServer": "[6.0.2, )", "AspNetCore.HealthChecks.Uris": "[6.0.3, )", "Azure.Messaging.EventGrid": "[4.10.0, )", - "Commercial.Core": "[2023.10.0, )", - "Commercial.Infrastructure.EntityFramework": "[2023.10.0, )", - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )", + "Commercial.Core": "[2023.10.1, )", + "Commercial.Infrastructure.EntityFramework": "[2023.10.1, )", + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )", "Swashbuckle.AspNetCore": "[6.5.0, )" } }, "commercial.core": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )" + "Core": "[2023.10.1, )" } }, "commercial.infrastructure.entityframework": { "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } }, "common": { @@ -3041,7 +3041,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", @@ -3095,8 +3095,8 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Common": "[2023.10.0, )", - "Core": "[2023.10.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, )", @@ -3106,7 +3106,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -3114,7 +3114,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -3126,9 +3126,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/test/Billing.Test/packages.lock.json b/test/Billing.Test/packages.lock.json index 61f722ca9a..9c99d0c5ca 100644 --- a/test/Billing.Test/packages.lock.json +++ b/test/Billing.Test/packages.lock.json @@ -2842,8 +2842,8 @@ "billing": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )" } }, "common": { @@ -2851,7 +2851,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", @@ -2903,7 +2903,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2911,7 +2911,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2923,9 +2923,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/test/Core.Test/Models/Business/SecretsManagerSubscriptionUpdateTests.cs b/test/Core.Test/Models/Business/SecretsManagerSubscriptionUpdateTests.cs index 88e21862b5..ce08065aba 100644 --- a/test/Core.Test/Models/Business/SecretsManagerSubscriptionUpdateTests.cs +++ b/test/Core.Test/Models/Business/SecretsManagerSubscriptionUpdateTests.cs @@ -43,6 +43,7 @@ public class SecretsManagerSubscriptionUpdateTests [BitAutoData(PlanType.TeamsAnnually2019)] [BitAutoData(PlanType.TeamsAnnually2020)] [BitAutoData(PlanType.TeamsAnnually)] + [BitAutoData(PlanType.TeamsStarter)] public void UpdateSubscription_WithNonSecretsManagerPlanType_DoesNotThrowException( PlanType planType, Organization organization) diff --git a/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/AddSecretsManagerSubscriptionCommandTests.cs b/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/AddSecretsManagerSubscriptionCommandTests.cs index e3b9487197..46987d6fca 100644 --- a/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/AddSecretsManagerSubscriptionCommandTests.cs +++ b/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/AddSecretsManagerSubscriptionCommandTests.cs @@ -19,9 +19,18 @@ namespace Bit.Core.Test.OrganizationFeatures.OrganizationSubscriptionUpdate; public class AddSecretsManagerSubscriptionCommandTests { [Theory] + [BitAutoData(PlanType.TeamsAnnually2019)] + [BitAutoData(PlanType.TeamsAnnually2020)] [BitAutoData(PlanType.TeamsAnnually)] + [BitAutoData(PlanType.TeamsMonthly2019)] + [BitAutoData(PlanType.TeamsMonthly2020)] [BitAutoData(PlanType.TeamsMonthly)] + [BitAutoData(PlanType.TeamsStarter)] + [BitAutoData(PlanType.EnterpriseAnnually2019)] + [BitAutoData(PlanType.EnterpriseAnnually2020)] [BitAutoData(PlanType.EnterpriseAnnually)] + [BitAutoData(PlanType.EnterpriseMonthly2019)] + [BitAutoData(PlanType.EnterpriseMonthly2020)] [BitAutoData(PlanType.EnterpriseMonthly)] public async Task SignUpAsync_ReturnsSuccessAndClientSecret_WhenOrganizationAndPlanExist(PlanType planType, SutProvider sutProvider, diff --git a/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/UpdateSecretsManagerSubscriptionCommandTests.cs b/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/UpdateSecretsManagerSubscriptionCommandTests.cs index 16508bd25a..c17ab2b834 100644 --- a/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/UpdateSecretsManagerSubscriptionCommandTests.cs +++ b/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/UpdateSecretsManagerSubscriptionCommandTests.cs @@ -22,16 +22,26 @@ namespace Bit.Core.Test.OrganizationFeatures.OrganizationSubscriptionUpdate; public class UpdateSecretsManagerSubscriptionCommandTests { [Theory] + [BitAutoData(PlanType.EnterpriseAnnually2019)] + [BitAutoData(PlanType.EnterpriseAnnually2020)] [BitAutoData(PlanType.EnterpriseAnnually)] + [BitAutoData(PlanType.EnterpriseMonthly2019)] + [BitAutoData(PlanType.EnterpriseMonthly2020)] [BitAutoData(PlanType.EnterpriseMonthly)] + [BitAutoData(PlanType.TeamsMonthly2019)] + [BitAutoData(PlanType.TeamsMonthly2020)] [BitAutoData(PlanType.TeamsMonthly)] + [BitAutoData(PlanType.TeamsAnnually2019)] + [BitAutoData(PlanType.TeamsAnnually2020)] [BitAutoData(PlanType.TeamsAnnually)] + [BitAutoData(PlanType.TeamsStarter)] public async Task UpdateSubscriptionAsync_UpdateEverything_ValidInput_Passes( PlanType planType, Organization organization, SutProvider sutProvider) { organization.PlanType = planType; + organization.Seats = 400; organization.SmSeats = 10; organization.MaxAutoscaleSmSeats = 20; organization.SmServiceAccounts = 200; @@ -77,6 +87,7 @@ public class UpdateSecretsManagerSubscriptionCommandTests [BitAutoData(PlanType.EnterpriseMonthly)] [BitAutoData(PlanType.TeamsMonthly)] [BitAutoData(PlanType.TeamsAnnually)] + [BitAutoData(PlanType.TeamsStarter)] public async Task UpdateSubscriptionAsync_ValidInput_WithNullMaxAutoscale_Passes( PlanType planType, Organization organization, @@ -168,10 +179,19 @@ public class UpdateSecretsManagerSubscriptionCommandTests } [Theory] + [BitAutoData(PlanType.EnterpriseAnnually2019)] + [BitAutoData(PlanType.EnterpriseAnnually2020)] [BitAutoData(PlanType.EnterpriseAnnually)] + [BitAutoData(PlanType.EnterpriseMonthly2019)] + [BitAutoData(PlanType.EnterpriseMonthly2020)] [BitAutoData(PlanType.EnterpriseMonthly)] + [BitAutoData(PlanType.TeamsMonthly2019)] + [BitAutoData(PlanType.TeamsMonthly2020)] [BitAutoData(PlanType.TeamsMonthly)] + [BitAutoData(PlanType.TeamsAnnually2019)] + [BitAutoData(PlanType.TeamsAnnually2020)] [BitAutoData(PlanType.TeamsAnnually)] + [BitAutoData(PlanType.TeamsStarter)] public async Task UpdateSubscriptionAsync_PaidPlan_NullGatewayCustomerId_ThrowsException( PlanType planType, Organization organization, @@ -187,10 +207,19 @@ public class UpdateSecretsManagerSubscriptionCommandTests } [Theory] + [BitAutoData(PlanType.EnterpriseAnnually2019)] + [BitAutoData(PlanType.EnterpriseAnnually2020)] [BitAutoData(PlanType.EnterpriseAnnually)] + [BitAutoData(PlanType.EnterpriseMonthly2019)] + [BitAutoData(PlanType.EnterpriseMonthly2020)] [BitAutoData(PlanType.EnterpriseMonthly)] + [BitAutoData(PlanType.TeamsMonthly2019)] + [BitAutoData(PlanType.TeamsMonthly2020)] [BitAutoData(PlanType.TeamsMonthly)] + [BitAutoData(PlanType.TeamsAnnually2019)] + [BitAutoData(PlanType.TeamsAnnually2020)] [BitAutoData(PlanType.TeamsAnnually)] + [BitAutoData(PlanType.TeamsStarter)] public async Task UpdateSubscriptionAsync_PaidPlan_NullGatewaySubscriptionId_ThrowsException( PlanType planType, Organization organization, @@ -206,10 +235,19 @@ public class UpdateSecretsManagerSubscriptionCommandTests } [Theory] + [BitAutoData(PlanType.EnterpriseAnnually2019)] + [BitAutoData(PlanType.EnterpriseAnnually2020)] [BitAutoData(PlanType.EnterpriseAnnually)] + [BitAutoData(PlanType.EnterpriseMonthly2019)] + [BitAutoData(PlanType.EnterpriseMonthly2020)] [BitAutoData(PlanType.EnterpriseMonthly)] + [BitAutoData(PlanType.TeamsMonthly2019)] + [BitAutoData(PlanType.TeamsMonthly2020)] [BitAutoData(PlanType.TeamsMonthly)] + [BitAutoData(PlanType.TeamsAnnually2019)] + [BitAutoData(PlanType.TeamsAnnually2020)] [BitAutoData(PlanType.TeamsAnnually)] + [BitAutoData(PlanType.TeamsStarter)] public async Task AdjustServiceAccountsAsync_WithEnterpriseOrTeamsPlans_Success(PlanType planType, Guid organizationId, SutProvider sutProvider) { @@ -501,10 +539,19 @@ public class UpdateSecretsManagerSubscriptionCommandTests } [Theory] + [BitAutoData(PlanType.EnterpriseAnnually2019)] + [BitAutoData(PlanType.EnterpriseAnnually2020)] [BitAutoData(PlanType.EnterpriseAnnually)] + [BitAutoData(PlanType.EnterpriseMonthly2019)] + [BitAutoData(PlanType.EnterpriseMonthly2020)] [BitAutoData(PlanType.EnterpriseMonthly)] + [BitAutoData(PlanType.TeamsMonthly2019)] + [BitAutoData(PlanType.TeamsMonthly2020)] [BitAutoData(PlanType.TeamsMonthly)] + [BitAutoData(PlanType.TeamsAnnually2019)] + [BitAutoData(PlanType.TeamsAnnually2020)] [BitAutoData(PlanType.TeamsAnnually)] + [BitAutoData(PlanType.TeamsStarter)] public async Task UpdateSmServiceAccounts_WhenCurrentServiceAccountsIsGreaterThanNew_ThrowsBadRequestException( PlanType planType, Organization organization, diff --git a/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/UpgradeOrganizationPlanCommandTests.cs b/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/UpgradeOrganizationPlanCommandTests.cs index f79001639e..b7f7d32cb9 100644 --- a/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/UpgradeOrganizationPlanCommandTests.cs +++ b/test/Core.Test/OrganizationFeatures/OrganizationSubscriptionUpdate/UpgradeOrganizationPlanCommandTests.cs @@ -104,6 +104,7 @@ public class UpgradeOrganizationPlanCommandTests [BitAutoData(PlanType.EnterpriseAnnually)] [BitAutoData(PlanType.TeamsMonthly)] [BitAutoData(PlanType.TeamsAnnually)] + [BitAutoData(PlanType.TeamsStarter)] public async Task UpgradePlan_SM_Passes(PlanType planType, Organization organization, OrganizationUpgrade upgrade, SutProvider sutProvider) { @@ -135,6 +136,7 @@ public class UpgradeOrganizationPlanCommandTests [BitAutoData(PlanType.EnterpriseAnnually)] [BitAutoData(PlanType.TeamsMonthly)] [BitAutoData(PlanType.TeamsAnnually)] + [BitAutoData(PlanType.TeamsStarter)] public async Task UpgradePlan_SM_NotEnoughSmSeats_Throws(PlanType planType, Organization organization, OrganizationUpgrade upgrade, SutProvider sutProvider) { @@ -160,6 +162,7 @@ public class UpgradeOrganizationPlanCommandTests [BitAutoData(PlanType.EnterpriseAnnually, 201)] [BitAutoData(PlanType.TeamsMonthly, 51)] [BitAutoData(PlanType.TeamsAnnually, 51)] + [BitAutoData(PlanType.TeamsStarter, 51)] public async Task UpgradePlan_SM_NotEnoughServiceAccounts_Throws(PlanType planType, int currentServiceAccounts, Organization organization, OrganizationUpgrade upgrade, SutProvider sutProvider) { diff --git a/test/Core.Test/Services/OrganizationServiceTests.cs b/test/Core.Test/Services/OrganizationServiceTests.cs index a7428697f6..210e59681b 100644 --- a/test/Core.Test/Services/OrganizationServiceTests.cs +++ b/test/Core.Test/Services/OrganizationServiceTests.cs @@ -1355,10 +1355,14 @@ public class OrganizationServiceTests [BitAutoData(PlanType.Custom, OrganizationUserType.Owner)] [BitAutoData(PlanType.EnterpriseAnnually, OrganizationUserType.Admin)] [BitAutoData(PlanType.EnterpriseAnnually, OrganizationUserType.Owner)] + [BitAutoData(PlanType.EnterpriseAnnually2020, OrganizationUserType.Admin)] + [BitAutoData(PlanType.EnterpriseAnnually2020, OrganizationUserType.Owner)] [BitAutoData(PlanType.EnterpriseAnnually2019, OrganizationUserType.Admin)] [BitAutoData(PlanType.EnterpriseAnnually2019, OrganizationUserType.Owner)] [BitAutoData(PlanType.EnterpriseMonthly, OrganizationUserType.Admin)] [BitAutoData(PlanType.EnterpriseMonthly, OrganizationUserType.Owner)] + [BitAutoData(PlanType.EnterpriseMonthly2020, OrganizationUserType.Admin)] + [BitAutoData(PlanType.EnterpriseMonthly2020, OrganizationUserType.Owner)] [BitAutoData(PlanType.EnterpriseMonthly2019, OrganizationUserType.Admin)] [BitAutoData(PlanType.EnterpriseMonthly2019, OrganizationUserType.Owner)] [BitAutoData(PlanType.FamiliesAnnually, OrganizationUserType.Admin)] @@ -1367,10 +1371,14 @@ public class OrganizationServiceTests [BitAutoData(PlanType.FamiliesAnnually2019, OrganizationUserType.Owner)] [BitAutoData(PlanType.TeamsAnnually, OrganizationUserType.Admin)] [BitAutoData(PlanType.TeamsAnnually, OrganizationUserType.Owner)] + [BitAutoData(PlanType.TeamsAnnually2020, OrganizationUserType.Admin)] + [BitAutoData(PlanType.TeamsAnnually2020, OrganizationUserType.Owner)] [BitAutoData(PlanType.TeamsAnnually2019, OrganizationUserType.Admin)] [BitAutoData(PlanType.TeamsAnnually2019, OrganizationUserType.Owner)] [BitAutoData(PlanType.TeamsMonthly, OrganizationUserType.Admin)] [BitAutoData(PlanType.TeamsMonthly, OrganizationUserType.Owner)] + [BitAutoData(PlanType.TeamsMonthly2020, OrganizationUserType.Admin)] + [BitAutoData(PlanType.TeamsMonthly2020, OrganizationUserType.Owner)] [BitAutoData(PlanType.TeamsMonthly2019, OrganizationUserType.Admin)] [BitAutoData(PlanType.TeamsMonthly2019, OrganizationUserType.Owner)] public async Task ConfirmUserToNonFree_AlreadyFreeAdminOrOwner_DoesNotThrow(PlanType planType, OrganizationUserType orgUserType, Organization org, OrganizationUser confirmingUser, @@ -1788,28 +1796,10 @@ public class OrganizationServiceTests Assert.Equal(includeProvider, result); } - [Theory] - [BitAutoData(PlanType.EnterpriseAnnually2019)] - public void ValidateSecretsManagerPlan_ThrowsException_WhenInvalidPlanSelected( - PlanType planType, SutProvider sutProvider) - { - var plan = StaticStore.GetPlan(planType); - - var signup = new OrganizationUpgrade - { - UseSecretsManager = true, - AdditionalSmSeats = 1, - AdditionalServiceAccounts = 10, - AdditionalSeats = 1 - }; - - var exception = Assert.Throws(() => sutProvider.Sut.ValidateSecretsManagerPlan(plan, signup)); - Assert.Contains("Invalid Secrets Manager plan selected.", exception.Message); - } - [Theory] [BitAutoData(PlanType.TeamsAnnually)] [BitAutoData(PlanType.TeamsMonthly)] + [BitAutoData(PlanType.TeamsStarter)] [BitAutoData(PlanType.EnterpriseAnnually)] [BitAutoData(PlanType.EnterpriseMonthly)] public void ValidateSecretsManagerPlan_ThrowsException_WhenNoSecretsManagerSeats(PlanType planType, SutProvider sutProvider) @@ -1882,6 +1872,7 @@ public class OrganizationServiceTests [Theory] [BitAutoData(PlanType.TeamsAnnually)] [BitAutoData(PlanType.TeamsMonthly)] + [BitAutoData(PlanType.TeamsStarter)] [BitAutoData(PlanType.EnterpriseAnnually)] [BitAutoData(PlanType.EnterpriseMonthly)] public void ValidateSecretsManagerPlan_ThrowsException_WhenSubtractingServiceAccounts( @@ -1921,6 +1912,7 @@ public class OrganizationServiceTests [Theory] [BitAutoData(PlanType.TeamsAnnually)] [BitAutoData(PlanType.TeamsMonthly)] + [BitAutoData(PlanType.TeamsStarter)] [BitAutoData(PlanType.EnterpriseAnnually)] [BitAutoData(PlanType.EnterpriseMonthly)] public void ValidateSecretsManagerPlan_ValidPlan_NoExceptionThrown( diff --git a/test/Core.Test/Utilities/StaticStoreTests.cs b/test/Core.Test/Utilities/StaticStoreTests.cs index 9abd31c8f8..4b16ec96f9 100644 --- a/test/Core.Test/Utilities/StaticStoreTests.cs +++ b/test/Core.Test/Utilities/StaticStoreTests.cs @@ -13,7 +13,7 @@ public class StaticStoreTests var plans = StaticStore.Plans.ToList(); Assert.NotNull(plans); Assert.NotEmpty(plans); - Assert.Equal(16, plans.Count); + Assert.Equal(17, plans.Count); } [Theory] @@ -21,6 +21,7 @@ public class StaticStoreTests [InlineData(PlanType.EnterpriseMonthly)] [InlineData(PlanType.TeamsMonthly)] [InlineData(PlanType.TeamsAnnually)] + [InlineData(PlanType.TeamsStarter)] public void StaticStore_GetPlan_Success(PlanType planType) { var plan = StaticStore.GetPlan(planType); diff --git a/test/Core.Test/packages.lock.json b/test/Core.Test/packages.lock.json index 7e0633aa0e..e7ab5a43b6 100644 --- a/test/Core.Test/packages.lock.json +++ b/test/Core.Test/packages.lock.json @@ -2673,7 +2673,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", diff --git a/test/Icons.Test/packages.lock.json b/test/Icons.Test/packages.lock.json index b554ade595..ad10e6ecfd 100644 --- a/test/Icons.Test/packages.lock.json +++ b/test/Icons.Test/packages.lock.json @@ -2842,7 +2842,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", @@ -2895,14 +2895,14 @@ "type": "Project", "dependencies": { "AngleSharp": "[1.0.4, )", - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2910,7 +2910,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2922,9 +2922,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/test/Identity.IntegrationTest/packages.lock.json b/test/Identity.IntegrationTest/packages.lock.json index f02d4cab25..1a4247ec18 100644 --- a/test/Identity.IntegrationTest/packages.lock.json +++ b/test/Identity.IntegrationTest/packages.lock.json @@ -2981,7 +2981,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", @@ -3033,15 +3033,15 @@ "identity": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )", + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )", "Swashbuckle.AspNetCore.SwaggerGen": "[6.5.0, )" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -3049,7 +3049,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -3061,8 +3061,8 @@ "integrationtestcommon": { "type": "Project", "dependencies": { - "Common": "[2023.10.0, )", - "Identity": "[2023.10.0, )", + "Common": "[2023.10.1, )", + "Identity": "[2023.10.1, )", "Microsoft.AspNetCore.Mvc.Testing": "[6.0.5, )", "Microsoft.Extensions.Configuration": "[6.0.1, )" } @@ -3070,9 +3070,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/test/Identity.Test/packages.lock.json b/test/Identity.Test/packages.lock.json index 9d9556167d..2b2820ea74 100644 --- a/test/Identity.Test/packages.lock.json +++ b/test/Identity.Test/packages.lock.json @@ -2856,7 +2856,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", @@ -2908,15 +2908,15 @@ "identity": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )", + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )", "Swashbuckle.AspNetCore.SwaggerGen": "[6.5.0, )" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2924,7 +2924,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2936,9 +2936,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/test/Infrastructure.EFIntegration.Test/packages.lock.json b/test/Infrastructure.EFIntegration.Test/packages.lock.json index 5cefe17a28..858754eb8f 100644 --- a/test/Infrastructure.EFIntegration.Test/packages.lock.json +++ b/test/Infrastructure.EFIntegration.Test/packages.lock.json @@ -2836,7 +2836,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", @@ -2890,8 +2890,8 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Common": "[2023.10.0, )", - "Core": "[2023.10.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, )", @@ -2901,7 +2901,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2909,7 +2909,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", diff --git a/test/Infrastructure.IntegrationTest/packages.lock.json b/test/Infrastructure.IntegrationTest/packages.lock.json index d0be2a9d84..ec0e0a4996 100644 --- a/test/Infrastructure.IntegrationTest/packages.lock.json +++ b/test/Infrastructure.IntegrationTest/packages.lock.json @@ -2746,7 +2746,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2754,7 +2754,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", diff --git a/test/IntegrationTestCommon/packages.lock.json b/test/IntegrationTestCommon/packages.lock.json index 2d4a900da1..53320be614 100644 --- a/test/IntegrationTestCommon/packages.lock.json +++ b/test/IntegrationTestCommon/packages.lock.json @@ -2966,7 +2966,7 @@ "dependencies": { "AutoFixture.AutoNSubstitute": "[4.17.0, )", "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", "NSubstitute": "[4.3.0, )", @@ -3018,15 +3018,15 @@ "identity": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )", + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )", "Swashbuckle.AspNetCore.SwaggerGen": "[6.5.0, )" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -3034,7 +3034,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -3046,9 +3046,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/util/Migrator/DbScripts/2023-10-13_01_2019EnterprisePlanFeatureUpgrade.sql b/util/Migrator/DbScripts/2023-10-13_01_2019EnterprisePlanFeatureUpgrade.sql index 94e58e89fa..18d03513db 100644 --- a/util/Migrator/DbScripts/2023-10-13_01_2019EnterprisePlanFeatureUpgrade.sql +++ b/util/Migrator/DbScripts/2023-10-13_01_2019EnterprisePlanFeatureUpgrade.sql @@ -5,7 +5,6 @@ BEGIN TRY [dbo].[Organization] SET [UseSso] = 1, - [UseKeyConnector] = 1, [UseScim] = 1, [UseResetPassword] = 1 WHERE diff --git a/util/MsSqlMigratorUtility/packages.lock.json b/util/MsSqlMigratorUtility/packages.lock.json index a484132004..ed07358b35 100644 --- a/util/MsSqlMigratorUtility/packages.lock.json +++ b/util/MsSqlMigratorUtility/packages.lock.json @@ -2709,7 +2709,7 @@ "migrator": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.Extensions.Logging": "[6.0.0, )", "dbup-sqlserver": "[5.0.8, )" } diff --git a/util/MySqlMigrations/packages.lock.json b/util/MySqlMigrations/packages.lock.json index 0b3ad4001d..f57e95b2b7 100644 --- a/util/MySqlMigrations/packages.lock.json +++ b/util/MySqlMigrations/packages.lock.json @@ -2657,7 +2657,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", diff --git a/util/PostgresMigrations/packages.lock.json b/util/PostgresMigrations/packages.lock.json index 0b3ad4001d..f57e95b2b7 100644 --- a/util/PostgresMigrations/packages.lock.json +++ b/util/PostgresMigrations/packages.lock.json @@ -2657,7 +2657,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", diff --git a/util/Setup/packages.lock.json b/util/Setup/packages.lock.json index 3a7e58aef1..fb1aeb0aab 100644 --- a/util/Setup/packages.lock.json +++ b/util/Setup/packages.lock.json @@ -2677,7 +2677,7 @@ "migrator": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.Extensions.Logging": "[6.0.0, )", "dbup-sqlserver": "[5.0.8, )" } diff --git a/util/SqlServerEFScaffold/packages.lock.json b/util/SqlServerEFScaffold/packages.lock.json index 2a74ea1148..5a154ded38 100644 --- a/util/SqlServerEFScaffold/packages.lock.json +++ b/util/SqlServerEFScaffold/packages.lock.json @@ -2801,25 +2801,25 @@ "AspNetCore.HealthChecks.SqlServer": "[6.0.2, )", "AspNetCore.HealthChecks.Uris": "[6.0.3, )", "Azure.Messaging.EventGrid": "[4.10.0, )", - "Commercial.Core": "[2023.10.0, )", - "Commercial.Infrastructure.EntityFramework": "[2023.10.0, )", - "Core": "[2023.10.0, )", - "SharedWeb": "[2023.10.0, )", + "Commercial.Core": "[2023.10.1, )", + "Commercial.Infrastructure.EntityFramework": "[2023.10.1, )", + "Core": "[2023.10.1, )", + "SharedWeb": "[2023.10.1, )", "Swashbuckle.AspNetCore": "[6.5.0, )" } }, "commercial.core": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )" + "Core": "[2023.10.1, )" } }, "commercial.infrastructure.entityframework": { "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } }, "core": { @@ -2867,7 +2867,7 @@ "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Dapper": "[2.0.123, )" } }, @@ -2875,7 +2875,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )", @@ -2887,9 +2887,9 @@ "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.10.0, )", - "Infrastructure.Dapper": "[2023.10.0, )", - "Infrastructure.EntityFramework": "[2023.10.0, )" + "Core": "[2023.10.1, )", + "Infrastructure.Dapper": "[2023.10.1, )", + "Infrastructure.EntityFramework": "[2023.10.1, )" } } } diff --git a/util/SqliteMigrations/packages.lock.json b/util/SqliteMigrations/packages.lock.json index 0b3ad4001d..f57e95b2b7 100644 --- a/util/SqliteMigrations/packages.lock.json +++ b/util/SqliteMigrations/packages.lock.json @@ -2657,7 +2657,7 @@ "type": "Project", "dependencies": { "AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )", - "Core": "[2023.10.0, )", + "Core": "[2023.10.1, )", "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )", "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )", "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",