mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
[AC-2052] Block Manager role and AccessAll if using FlexibleCollections (#3671)
* Also don't assign AccessAll to the first orgUser if using Flexible Collections
This commit is contained in:
@ -18,6 +18,7 @@ namespace Bit.Core.Test.AutoFixture.OrganizationFixtures;
|
||||
public class OrganizationCustomization : ICustomization
|
||||
{
|
||||
public bool UseGroups { get; set; }
|
||||
public bool FlexibleCollections { get; set; }
|
||||
|
||||
public void Customize(IFixture fixture)
|
||||
{
|
||||
@ -27,7 +28,8 @@ public class OrganizationCustomization : ICustomization
|
||||
fixture.Customize<Organization>(composer => composer
|
||||
.With(o => o.Id, organizationId)
|
||||
.With(o => o.MaxCollections, maxCollections)
|
||||
.With(o => o.UseGroups, UseGroups));
|
||||
.With(o => o.UseGroups, UseGroups)
|
||||
.With(o => o.FlexibleCollections, FlexibleCollections));
|
||||
|
||||
fixture.Customize<Collection>(composer =>
|
||||
composer
|
||||
@ -181,10 +183,15 @@ internal class TeamsMonthlyWithAddOnsOrganizationCustomization : ICustomization
|
||||
}
|
||||
}
|
||||
|
||||
internal class OrganizationCustomizeAttribute : BitCustomizeAttribute
|
||||
public class OrganizationCustomizeAttribute : BitCustomizeAttribute
|
||||
{
|
||||
public bool UseGroups { get; set; }
|
||||
public override ICustomization GetCustomization() => new OrganizationCustomization() { UseGroups = UseGroups };
|
||||
public bool FlexibleCollections { get; set; }
|
||||
public override ICustomization GetCustomization() => new OrganizationCustomization()
|
||||
{
|
||||
UseGroups = UseGroups,
|
||||
FlexibleCollections = FlexibleCollections
|
||||
};
|
||||
}
|
||||
|
||||
internal class PaidOrganizationCustomizeAttribute : BitCustomizeAttribute
|
||||
|
Reference in New Issue
Block a user