mirror of
https://github.com/bitwarden/server.git
synced 2024-11-28 13:15:12 +01:00
chore: remove AllowAdminAccessToAllCollectionItems ref along with feature service call, refs AC-2683 (#4535)
This commit is contained in:
parent
2157df9ac8
commit
4d3c1c5a5c
@ -310,8 +310,7 @@ public class ProvidersController : Controller
|
|||||||
return RedirectToAction("Index");
|
return RedirectToAction("Index");
|
||||||
}
|
}
|
||||||
|
|
||||||
var flexibleCollectionsV1Enabled = _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1);
|
var organization = model.CreateOrganization(provider);
|
||||||
var organization = model.CreateOrganization(provider, flexibleCollectionsV1Enabled);
|
|
||||||
await _organizationService.CreatePendingOrganization(organization, model.Owners, User, _userService, model.SalesAssistedTrialStarted);
|
await _organizationService.CreatePendingOrganization(organization, model.Owners, User, _userService, model.SalesAssistedTrialStarted);
|
||||||
await _providerService.AddOrganization(providerId, organization.Id, null);
|
await _providerService.AddOrganization(providerId, organization.Id, null);
|
||||||
|
|
||||||
|
@ -244,17 +244,10 @@ public class OrganizationEditModel : OrganizationViewModel
|
|||||||
return plan;
|
return plan;
|
||||||
});
|
});
|
||||||
|
|
||||||
public Organization CreateOrganization(Provider provider, bool flexibleCollectionsV1Enabled)
|
public Organization CreateOrganization(Provider provider)
|
||||||
{
|
{
|
||||||
BillingEmail = provider.BillingEmail;
|
BillingEmail = provider.BillingEmail;
|
||||||
|
return ToOrganization(new Organization());
|
||||||
var newOrg = new Organization
|
|
||||||
{
|
|
||||||
// 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
|
|
||||||
};
|
|
||||||
return ToOrganization(newOrg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Organization ToOrganization(Organization existingOrganization)
|
public Organization ToOrganization(Organization existingOrganization)
|
||||||
|
Loading…
Reference in New Issue
Block a user