1
0
mirror of https://github.com/bitwarden/server synced 2025-12-25 20:53:16 +00:00

[AC-2214] Defect - provider reseller org creation when fc signup flag enabled (#3805)

* fix: supply signup feature flag to provider reseller org creation, refs AC-2214

* feat: extend flexible collections coverage to enhancement bools, refs AC-2214
This commit is contained in:
Vincent Salucci
2024-02-20 09:53:50 -06:00
committed by GitHub
parent 4e6360cc4f
commit e23f37ea1f
2 changed files with 21 additions and 4 deletions

View File

@@ -164,11 +164,22 @@ public class OrganizationEditModel : OrganizationViewModel
{ "baseServiceAccount", p.SecretsManager.BaseServiceAccount }
});
public Organization CreateOrganization(Provider provider)
public Organization CreateOrganization(Provider provider, bool flexibleCollectionsSignupEnabled, bool flexibleCollectionsV1Enabled)
{
BillingEmail = provider.BillingEmail;
return ToOrganization(new Organization());
var newOrg = new Organization
{
// This feature flag indicates that new organizations should be automatically onboarded to
// Flexible Collections enhancements
FlexibleCollections = flexibleCollectionsSignupEnabled,
// These collection management settings smooth the migration for existing organizations by disabling some FC behavior.
// If the organization is onboarded to Flexible Collections on signup, we turn them OFF to enable all new behaviour.
// If the organization is NOT onboarded now, they will have to be migrated later, so they default to ON to limit FC changes on migration.
LimitCollectionCreationDeletion = !flexibleCollectionsSignupEnabled,
AllowAdminAccessToAllCollectionItems = !flexibleCollectionsV1Enabled
};
return ToOrganization(newOrg);
}
public Organization ToOrganization(Organization existingOrganization)