diff --git a/bitwarden_license/test/Scim.IntegrationTest/Controllers/v2/GroupsControllerTests.cs b/bitwarden_license/test/Scim.IntegrationTest/Controllers/v2/GroupsControllerTests.cs index 898e12b422..6742c6e0ad 100644 --- a/bitwarden_license/test/Scim.IntegrationTest/Controllers/v2/GroupsControllerTests.cs +++ b/bitwarden_license/test/Scim.IntegrationTest/Controllers/v2/GroupsControllerTests.cs @@ -17,7 +17,6 @@ public class GroupsControllerTests : IClassFixture, IAsy public GroupsControllerTests(ScimApplicationFactory factory) { _factory = factory; - _factory.DatabaseName = "test_database_groups"; } public Task InitializeAsync() diff --git a/bitwarden_license/test/Scim.IntegrationTest/Controllers/v2/UsersControllerTests.cs b/bitwarden_license/test/Scim.IntegrationTest/Controllers/v2/UsersControllerTests.cs index 5a025a2c8c..c0e4f3eb73 100644 --- a/bitwarden_license/test/Scim.IntegrationTest/Controllers/v2/UsersControllerTests.cs +++ b/bitwarden_license/test/Scim.IntegrationTest/Controllers/v2/UsersControllerTests.cs @@ -17,7 +17,6 @@ public class UsersControllerTests : IClassFixture, IAsyn public UsersControllerTests(ScimApplicationFactory factory) { _factory = factory; - _factory.DatabaseName = "test_database_users"; } public Task InitializeAsync() diff --git a/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json b/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json index e1d3b4b09e..f3b46cc550 100644 --- a/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json +++ b/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json @@ -655,14 +655,6 @@ "resolved": "7.0.5", "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA==" }, - "Microsoft.EntityFrameworkCore.InMemory": { - "type": "Transitive", - "resolved": "7.0.5", - "contentHash": "y3S/A/0uJX7KOhppC3xqyta6Z0PRz0qPLngH5GFu4GZ7/+Sw2u/amf7MavvR5GfZjGabGcohMpsRSahMmpF9gA==", - "dependencies": { - "Microsoft.EntityFrameworkCore": "7.0.5" - } - }, "Microsoft.EntityFrameworkCore.Relational": { "type": "Transitive", "resolved": "7.0.5", @@ -3072,7 +3064,6 @@ "Common": "[2023.9.0, )", "Identity": "[2023.9.0, )", "Microsoft.AspNetCore.Mvc.Testing": "[6.0.5, )", - "Microsoft.EntityFrameworkCore.InMemory": "[7.0.5, )", "Microsoft.Extensions.Configuration": "[6.0.1, )" } }, diff --git a/src/Admin/Utilities/WebHostEnvironmentExtensions.cs b/src/Admin/Utilities/WebHostEnvironmentExtensions.cs new file mode 100644 index 0000000000..9602d4c76d --- /dev/null +++ b/src/Admin/Utilities/WebHostEnvironmentExtensions.cs @@ -0,0 +1,24 @@ +namespace Bit.Admin.Utilities; + +public static class WebHostEnvironmentExtensions +{ + public static string GetStripeUrl(this IWebHostEnvironment hostingEnvironment) + { + if (hostingEnvironment.IsDevelopment() || hostingEnvironment.IsEnvironment("QA")) + { + return "https://dashboard.stripe.com/test"; + } + + return "https://dashboard.stripe.com"; + } + + public static string GetBraintreeMerchantUrl(this IWebHostEnvironment hostingEnvironment) + { + if (hostingEnvironment.IsDevelopment() || hostingEnvironment.IsEnvironment("QA")) + { + return "https://www.sandbox.braintreegateway.com/merchants"; + } + + return "https://www.braintreegateway.com/merchants"; + } +} diff --git a/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml b/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml index 88dc8a78c1..69fd55dc21 100644 --- a/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml +++ b/src/Admin/Views/Shared/_OrganizationFormScripts.cshtml @@ -1,3 +1,5 @@ +@inject IWebHostEnvironment HostingEnvironment +@using Bit.Admin.Utilities @model OrganizationEditModel