diff --git a/src/Core/Constants.cs b/src/Core/Constants.cs index 4458827804..5f1a654668 100644 --- a/src/Core/Constants.cs +++ b/src/Core/Constants.cs @@ -104,7 +104,6 @@ public static class FeatureFlagKeys public const string BrowserFilelessImport = "browser-fileless-import"; public const string ReturnErrorOnExistingKeypair = "return-error-on-existing-keypair"; public const string UseTreeWalkerApiForPageDetailsCollection = "use-tree-walker-api-for-page-details-collection"; - public const string FlexibleCollectionsV1 = "flexible-collections-v-1"; // v-1 is intentional public const string ItemShare = "item-share"; public const string KeyRotationImprovements = "key-rotation-improvements"; public const string DuoRedirect = "duo-redirect"; @@ -151,7 +150,6 @@ public static class FeatureFlagKeys return new Dictionary() { { DuoRedirect, "true" }, - { FlexibleCollectionsV1, "true" }, { BulkDeviceApproval, "true" } }; } diff --git a/test/Api.Test/AdminConsole/Controllers/GroupsControllerPutTests.cs b/test/Api.Test/AdminConsole/Controllers/GroupsControllerPutTests.cs index 3a8e4831af..bc5bbfd325 100644 --- a/test/Api.Test/AdminConsole/Controllers/GroupsControllerPutTests.cs +++ b/test/Api.Test/AdminConsole/Controllers/GroupsControllerPutTests.cs @@ -3,7 +3,6 @@ using Bit.Api.AdminConsole.Controllers; using Bit.Api.AdminConsole.Models.Request; using Bit.Api.Models.Request; using Bit.Api.Vault.AuthorizationHandlers.Collections; -using Bit.Core; using Bit.Core.AdminConsole.Entities; using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces; using Bit.Core.AdminConsole.Repositories; @@ -284,9 +283,6 @@ public class GroupsControllerPutTests bool adminAccess, Group group, OrganizationUser? savingUser, List currentCollectionAccess, List currentGroupUsers) { - // FCv1 is now fully enabled - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1).Returns(true); - var orgId = organization.Id = group.OrganizationId; // Arrange org and orgAbility diff --git a/test/Api.Test/AdminConsole/Controllers/OrganizationUserControllerPutTests.cs b/test/Api.Test/AdminConsole/Controllers/OrganizationUserControllerPutTests.cs index 0b9c18c570..542a76090c 100644 --- a/test/Api.Test/AdminConsole/Controllers/OrganizationUserControllerPutTests.cs +++ b/test/Api.Test/AdminConsole/Controllers/OrganizationUserControllerPutTests.cs @@ -3,7 +3,6 @@ using Bit.Api.AdminConsole.Controllers; using Bit.Api.AdminConsole.Models.Request.Organizations; using Bit.Api.Models.Request; using Bit.Api.Vault.AuthorizationHandlers.Collections; -using Bit.Core; using Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.Interfaces; using Bit.Core.Context; using Bit.Core.Entities; @@ -258,9 +257,6 @@ public class OrganizationUserControllerPutTests OrganizationAbility organizationAbility, OrganizationUser organizationUser, Guid savingUserId, List currentCollectionAccess) { - // FCv1 is now fully enabled - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1).Returns(true); - var orgId = organizationAbility.Id = organizationUser.OrganizationId; sutProvider.GetDependency().ManageUsers(orgId).Returns(true); diff --git a/test/Api.Test/AdminConsole/Controllers/OrganizationUsersControllerTests.cs b/test/Api.Test/AdminConsole/Controllers/OrganizationUsersControllerTests.cs index deb4c68188..1a97e69999 100644 --- a/test/Api.Test/AdminConsole/Controllers/OrganizationUsersControllerTests.cs +++ b/test/Api.Test/AdminConsole/Controllers/OrganizationUsersControllerTests.cs @@ -2,7 +2,6 @@ using Bit.Api.AdminConsole.Controllers; using Bit.Api.AdminConsole.Models.Request.Organizations; using Bit.Api.Vault.AuthorizationHandlers.Collections; -using Bit.Core; using Bit.Core.AdminConsole.Entities; using Bit.Core.AdminConsole.Enums; using Bit.Core.AdminConsole.Models.Data.Organizations.Policies; @@ -170,7 +169,6 @@ public class OrganizationUsersControllerTests public async Task Invite_NotAuthorizedToGiveAccessToCollections_Throws(OrganizationAbility organizationAbility, OrganizationUserInviteRequestModel model, Guid userId, SutProvider sutProvider) { - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1).Returns(true); sutProvider.GetDependency().ManageUsers(organizationAbility.Id).Returns(true); sutProvider.GetDependency().GetOrganizationAbilityAsync(organizationAbility.Id) .Returns(organizationAbility); diff --git a/test/Api.Test/Vault/AuthorizationHandlers/BulkCollectionAuthorizationHandlerTests.cs b/test/Api.Test/Vault/AuthorizationHandlers/BulkCollectionAuthorizationHandlerTests.cs index ad3d58b029..b94162be8e 100644 --- a/test/Api.Test/Vault/AuthorizationHandlers/BulkCollectionAuthorizationHandlerTests.cs +++ b/test/Api.Test/Vault/AuthorizationHandlers/BulkCollectionAuthorizationHandlerTests.cs @@ -1,6 +1,5 @@ using System.Security.Claims; using Bit.Api.Vault.AuthorizationHandlers.Collections; -using Bit.Core; using Bit.Core.Context; using Bit.Core.Entities; using Bit.Core.Enums; @@ -561,7 +560,6 @@ public class BulkCollectionAuthorizationHandlerTests sutProvider.GetDependency().GetOrganization(organization.Id).Returns(organization); sutProvider.GetDependency().GetOrganizationAbilityAsync(organization.Id) .Returns(organizationAbility); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1).Returns(true); var context = new AuthorizationHandlerContext( new[] { op }, @@ -604,7 +602,6 @@ public class BulkCollectionAuthorizationHandlerTests sutProvider.GetDependency().GetOrganization(organization.Id).Returns(organization); sutProvider.GetDependency().GetOrganizationAbilityAsync(organization.Id) .Returns(organizationAbility); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1).Returns(true); var context = new AuthorizationHandlerContext( new[] { op }, @@ -802,8 +799,6 @@ public class BulkCollectionAuthorizationHandlerTests sutProvider.GetDependency().UserId.Returns(actingUserId); sutProvider.GetDependency().GetOrganization(organization.Id).Returns(organization); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1) - .Returns(true); sutProvider.GetDependency().GetOrganizationAbilityAsync(organization.Id) .Returns(new OrganizationAbility { AllowAdminAccessToAllCollectionItems = true }); @@ -830,8 +825,6 @@ public class BulkCollectionAuthorizationHandlerTests sutProvider.GetDependency().UserId.Returns(actingUserId); sutProvider.GetDependency().GetOrganization(organization.Id).Returns(organization); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1) - .Returns(true); sutProvider.GetDependency().GetOrganizationAbilityAsync(organization.Id) .Returns(new OrganizationAbility { AllowAdminAccessToAllCollectionItems = false }); @@ -858,8 +851,6 @@ public class BulkCollectionAuthorizationHandlerTests sutProvider.GetDependency().UserId.Returns(actingUserId); sutProvider.GetDependency().GetOrganization(organization.Id).Returns(organization); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1) - .Returns(true); sutProvider.GetDependency().GetOrganizationAbilityAsync(organization.Id) .Returns(new OrganizationAbility { AllowAdminAccessToAllCollectionItems = true }); @@ -886,8 +877,6 @@ public class BulkCollectionAuthorizationHandlerTests sutProvider.GetDependency().UserId.Returns(actingUserId); sutProvider.GetDependency().GetOrganization(organization.Id).Returns(organization); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1) - .Returns(true); sutProvider.GetDependency().GetOrganizationAbilityAsync(organization.Id) .Returns(new OrganizationAbility { AllowAdminAccessToAllCollectionItems = false }); @@ -1009,7 +998,6 @@ public class BulkCollectionAuthorizationHandlerTests sutProvider.GetDependency().UserId.Returns(actingUserId); sutProvider.GetDependency().GetOrganization(organization.Id).Returns(organization); sutProvider.GetDependency().GetManyByUserIdAsync(actingUserId).Returns(collections); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1).Returns(true); foreach (var c in collections) { @@ -1045,7 +1033,6 @@ public class BulkCollectionAuthorizationHandlerTests sutProvider.GetDependency().UserId.Returns(actingUserId); sutProvider.GetDependency().GetOrganization(organization.Id).Returns(organization); sutProvider.GetDependency().GetManyByUserIdAsync(actingUserId).Returns(collections); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1).Returns(true); foreach (var c in collections) { @@ -1081,7 +1068,6 @@ public class BulkCollectionAuthorizationHandlerTests sutProvider.GetDependency().UserId.Returns(actingUserId); sutProvider.GetDependency().GetOrganization(organization.Id).Returns(organization); sutProvider.GetDependency().GetManyByUserIdAsync(actingUserId).Returns(collections); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1).Returns(true); sutProvider.GetDependency().ProviderUserForOrgAsync(Arg.Any()).Returns(false); foreach (var c in collections) @@ -1115,7 +1101,6 @@ public class BulkCollectionAuthorizationHandlerTests sutProvider.GetDependency().UserId.Returns(actingUserId); sutProvider.GetDependency().GetOrganization(organization.Id).Returns(organization); sutProvider.GetDependency().GetManyByUserIdAsync(actingUserId).Returns(collections); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1).Returns(true); sutProvider.GetDependency().ProviderUserForOrgAsync(Arg.Any()).Returns(false); foreach (var c in collections) @@ -1149,7 +1134,6 @@ public class BulkCollectionAuthorizationHandlerTests sutProvider.GetDependency().UserId.Returns(actingUserId); sutProvider.GetDependency().GetOrganization(organization.Id).Returns(organization); sutProvider.GetDependency().GetManyByUserIdAsync(actingUserId).Returns(collections); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1).Returns(true); sutProvider.GetDependency().ProviderUserForOrgAsync(Arg.Any()).Returns(false); foreach (var c in collections) diff --git a/test/Api.Test/Vault/Controllers/CiphersControllerTests.cs b/test/Api.Test/Vault/Controllers/CiphersControllerTests.cs index 8c92984ffc..e7c5cd9ef5 100644 --- a/test/Api.Test/Vault/Controllers/CiphersControllerTests.cs +++ b/test/Api.Test/Vault/Controllers/CiphersControllerTests.cs @@ -170,7 +170,6 @@ public class CiphersControllerTests Id = organization.Id, AllowAdminAccessToAllCollectionItems = allowAdminsAccessToAllItems }); - sutProvider.GetDependency().IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1).Returns(true); if (shouldSucceed) {