1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

[AC-2881] Remove Organization.FlexibleCollections from code (#4552)

* Remove Organization.FlexibleCollections from code

* Drop Organization.FlexibleCollections column in EF databases
(MSSQL column to be retained for 1 additional deployment to support rollback in cloud)
This commit is contained in:
Thomas Rittson
2024-07-26 15:07:33 +10:00
committed by GitHub
parent f9a1a6fc95
commit ffdc40b21c
25 changed files with 8188 additions and 87 deletions

View File

@ -478,10 +478,6 @@ public class OrganizationService : IOrganizationService
// Secrets Manager not available for purchase with Consolidated Billing.
UseSecretsManager = false,
// Flexible Collections MVP is fully released and all organizations must always have this setting enabled.
// AC-1714 will remove this flag after all old code has been removed.
FlexibleCollections = true,
// This is a transitional setting that defaults to ON until Flexible Collections v1 is released
// (to preserve existing behavior) and defaults to OFF after release (enabling new behavior)
AllowAdminAccessToAllCollectionItems = !flexibleCollectionsV1Enabled
@ -568,10 +564,6 @@ public class OrganizationService : IOrganizationService
UsePasswordManager = true,
UseSecretsManager = signup.UseSecretsManager,
// Flexible Collections MVP is fully released and all organizations must always have this setting enabled.
// AC-1714 will remove this flag after all old code has been removed.
FlexibleCollections = true,
// This is a transitional setting that defaults to ON until Flexible Collections v1 is released
// (to preserve existing behavior) and defaults to OFF after release (enabling new behavior)
AllowAdminAccessToAllCollectionItems = !flexibleCollectionsV1IsEnabled
@ -696,10 +688,6 @@ public class OrganizationService : IOrganizationService
SmServiceAccounts = license.SmServiceAccounts,
LimitCollectionCreationDeletion = license.LimitCollectionCreationDeletion,
AllowAdminAccessToAllCollectionItems = license.AllowAdminAccessToAllCollectionItems,
// This feature flag indicates that new organizations should be automatically onboarded to
// Flexible Collections enhancements
FlexibleCollections = true,
};
var result = await SignUpAsync(organization, owner.Id, ownerKey, collectionName, false);
@ -2554,13 +2542,9 @@ public class OrganizationService : IOrganizationService
if (!string.IsNullOrWhiteSpace(collectionName))
{
// If using Flexible Collections, give the owner Can Manage access over the default collection
List<CollectionAccessSelection> defaultOwnerAccess = null;
if (org.FlexibleCollections)
{
defaultOwnerAccess =
[new CollectionAccessSelection { Id = organizationUserId, HidePasswords = false, ReadOnly = false, Manage = true }];
}
// give the owner Can Manage access over the default collection
List<CollectionAccessSelection> defaultOwnerAccess =
[new CollectionAccessSelection { Id = organizationUserId, HidePasswords = false, ReadOnly = false, Manage = true }];
var defaultCollection = new Collection
{