1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

[AC-1646] Rename LimitCollectionCdOwnerAdmin column (#3300)

* Rename LimitCollectionCdOwnerAdmin -> LimitCollectionCreationDeletion

* Rename and bump migration script
This commit is contained in:
Thomas Rittson
2023-09-27 07:37:34 +10:00
committed by GitHub
parent 5d431adbd4
commit a3f554a34e
25 changed files with 52 additions and 52 deletions

View File

@ -8,7 +8,7 @@ public class OrganizationCollectionManagementUpdateRequestModel
public virtual Organization ToOrganization(Organization existingOrganization) public virtual Organization ToOrganization(Organization existingOrganization)
{ {
existingOrganization.LimitCollectionCdOwnerAdmin = LimitCreateDeleteOwnerAdmin; existingOrganization.LimitCollectionCreationDeletion = LimitCreateDeleteOwnerAdmin;
return existingOrganization; return existingOrganization;
} }
} }

View File

@ -58,7 +58,7 @@ public class OrganizationResponseModel : ResponseModel
SmServiceAccounts = organization.SmServiceAccounts; SmServiceAccounts = organization.SmServiceAccounts;
MaxAutoscaleSmSeats = organization.MaxAutoscaleSmSeats; MaxAutoscaleSmSeats = organization.MaxAutoscaleSmSeats;
MaxAutoscaleSmServiceAccounts = organization.MaxAutoscaleSmServiceAccounts; MaxAutoscaleSmServiceAccounts = organization.MaxAutoscaleSmServiceAccounts;
LimitCollectionCdOwnerAdmin = organization.LimitCollectionCdOwnerAdmin; LimitCollectionCreationDeletion = organization.LimitCollectionCreationDeletion;
} }
public Guid Id { get; set; } public Guid Id { get; set; }
@ -98,7 +98,7 @@ public class OrganizationResponseModel : ResponseModel
public int? SmServiceAccounts { get; set; } public int? SmServiceAccounts { get; set; }
public int? MaxAutoscaleSmSeats { get; set; } public int? MaxAutoscaleSmSeats { get; set; }
public int? MaxAutoscaleSmServiceAccounts { get; set; } public int? MaxAutoscaleSmServiceAccounts { get; set; }
public bool LimitCollectionCdOwnerAdmin { get; set; } public bool LimitCollectionCreationDeletion { get; set; }
} }
public class OrganizationSubscriptionResponseModel : OrganizationResponseModel public class OrganizationSubscriptionResponseModel : OrganizationResponseModel

View File

@ -60,7 +60,7 @@ public class ProfileOrganizationResponseModel : ResponseModel
FamilySponsorshipToDelete = organization.FamilySponsorshipToDelete; FamilySponsorshipToDelete = organization.FamilySponsorshipToDelete;
FamilySponsorshipValidUntil = organization.FamilySponsorshipValidUntil; FamilySponsorshipValidUntil = organization.FamilySponsorshipValidUntil;
AccessSecretsManager = organization.AccessSecretsManager; AccessSecretsManager = organization.AccessSecretsManager;
LimitCollectionCdOwnerAdmin = organization.LimitCollectionCdOwnerAdmin; LimitCollectionCreationDeletion = organization.LimitCollectionCreationDeletion;
if (organization.SsoConfig != null) if (organization.SsoConfig != null)
{ {
@ -114,5 +114,5 @@ public class ProfileOrganizationResponseModel : ResponseModel
public DateTime? FamilySponsorshipValidUntil { get; set; } public DateTime? FamilySponsorshipValidUntil { get; set; }
public bool? FamilySponsorshipToDelete { get; set; } public bool? FamilySponsorshipToDelete { get; set; }
public bool AccessSecretsManager { get; set; } public bool AccessSecretsManager { get; set; }
public bool LimitCollectionCdOwnerAdmin { get; set; } public bool LimitCollectionCreationDeletion { get; set; }
} }

View File

@ -71,7 +71,7 @@ public class CollectionAuthorizationHandler : BulkAuthorizationHandler<Collectio
CurrentContextOrganization org) CurrentContextOrganization org)
{ {
// If false, all organization members are allowed to create collections // If false, all organization members are allowed to create collections
if (!org.LimitCollectionCdOwnerAdmin) if (!org.LimitCollectionCreationDeletion)
{ {
context.Succeed(requirement); context.Succeed(requirement);
return; return;
@ -104,7 +104,7 @@ public class CollectionAuthorizationHandler : BulkAuthorizationHandler<Collectio
} }
// The limit collection management setting is enabled and we are not an Admin (above condition), fail // The limit collection management setting is enabled and we are not an Admin (above condition), fail
if (org.LimitCollectionCdOwnerAdmin) if (org.LimitCollectionCreationDeletion)
{ {
context.Fail(); context.Fail();
return; return;

View File

@ -356,7 +356,7 @@ public class CurrentContext : ICurrentContext
var org = GetOrganization(orgId); var org = GetOrganization(orgId);
if (org != null) if (org != null)
{ {
canCreateNewCollections = !org.LimitCollectionCdOwnerAdmin || org.Permissions.CreateNewCollections; canCreateNewCollections = !org.LimitCollectionCreationDeletion || org.Permissions.CreateNewCollections;
} }
return await EditAssignedCollections(orgId) return await EditAssignedCollections(orgId)
|| await DeleteAssignedCollections(orgId) || await DeleteAssignedCollections(orgId)

View File

@ -15,12 +15,12 @@ public class CurrentContextOrganization
Type = orgUser.Type; Type = orgUser.Type;
Permissions = CoreHelpers.LoadClassFromJsonData<Permissions>(orgUser.Permissions); Permissions = CoreHelpers.LoadClassFromJsonData<Permissions>(orgUser.Permissions);
AccessSecretsManager = orgUser.AccessSecretsManager && orgUser.UseSecretsManager; AccessSecretsManager = orgUser.AccessSecretsManager && orgUser.UseSecretsManager;
LimitCollectionCdOwnerAdmin = orgUser.LimitCollectionCdOwnerAdmin; LimitCollectionCreationDeletion = orgUser.LimitCollectionCreationDeletion;
} }
public Guid Id { get; set; } public Guid Id { get; set; }
public OrganizationUserType Type { get; set; } public OrganizationUserType Type { get; set; }
public Permissions Permissions { get; set; } = new(); public Permissions Permissions { get; set; } = new();
public bool AccessSecretsManager { get; set; } public bool AccessSecretsManager { get; set; }
public bool LimitCollectionCdOwnerAdmin { get; set; } public bool LimitCollectionCreationDeletion { get; set; }
} }

View File

@ -81,7 +81,7 @@ public class Organization : ITableObject<Guid>, ISubscriber, IStorable, IStorabl
/// <summary> /// <summary>
/// Refers to the ability for an organization to limit collection creation and deletion to owners and admins only /// Refers to the ability for an organization to limit collection creation and deletion to owners and admins only
/// </summary> /// </summary>
public bool LimitCollectionCdOwnerAdmin { get; set; } public bool LimitCollectionCreationDeletion { get; set; }
public void SetNewId() public void SetNewId()
{ {

View File

@ -48,5 +48,5 @@ public class OrganizationUserOrganizationDetails
public bool UsePasswordManager { get; set; } public bool UsePasswordManager { get; set; }
public int? SmSeats { get; set; } public int? SmSeats { get; set; }
public int? SmServiceAccounts { get; set; } public int? SmServiceAccounts { get; set; }
public bool LimitCollectionCdOwnerAdmin { get; set; } public bool LimitCollectionCreationDeletion { get; set; }
} }

View File

@ -142,7 +142,7 @@ public class SelfHostedOrganizationDetails : Organization
RevisionDate = RevisionDate, RevisionDate = RevisionDate,
MaxAutoscaleSeats = MaxAutoscaleSeats, MaxAutoscaleSeats = MaxAutoscaleSeats,
OwnersNotifiedOfAutoscaling = OwnersNotifiedOfAutoscaling, OwnersNotifiedOfAutoscaling = OwnersNotifiedOfAutoscaling,
LimitCollectionCdOwnerAdmin = LimitCollectionCdOwnerAdmin, LimitCollectionCreationDeletion = LimitCollectionCreationDeletion,
}; };
} }
} }

View File

@ -107,7 +107,7 @@ public class DatabaseContext : DbContext
eGroup.Property(c => c.Id).ValueGeneratedNever(); eGroup.Property(c => c.Id).ValueGeneratedNever();
eInstallation.Property(c => c.Id).ValueGeneratedNever(); eInstallation.Property(c => c.Id).ValueGeneratedNever();
eOrganization.Property(c => c.Id).ValueGeneratedNever(); eOrganization.Property(c => c.Id).ValueGeneratedNever();
eOrganization.Property(c => c.LimitCollectionCdOwnerAdmin) eOrganization.Property(c => c.LimitCollectionCreationDeletion)
.ValueGeneratedNever() .ValueGeneratedNever()
.HasDefaultValue(true); .HasDefaultValue(true);
eOrganizationSponsorship.Property(c => c.Id).ValueGeneratedNever(); eOrganizationSponsorship.Property(c => c.Id).ValueGeneratedNever();

View File

@ -51,7 +51,7 @@
@MaxAutoscaleSmSeats INT= null, @MaxAutoscaleSmSeats INT= null,
@MaxAutoscaleSmServiceAccounts INT = null, @MaxAutoscaleSmServiceAccounts INT = null,
@SecretsManagerBeta BIT = 0, @SecretsManagerBeta BIT = 0,
@LimitCollectionCdOwnerAdmin BIT = 0 @LimitCollectionCreationDeletion BIT = 0
AS AS
BEGIN BEGIN
SET NOCOUNT ON SET NOCOUNT ON
@ -110,7 +110,7 @@ BEGIN
[MaxAutoscaleSmSeats], [MaxAutoscaleSmSeats],
[MaxAutoscaleSmServiceAccounts], [MaxAutoscaleSmServiceAccounts],
[SecretsManagerBeta], [SecretsManagerBeta],
[LimitCollectionCdOwnerAdmin] [LimitCollectionCreationDeletion]
) )
VALUES VALUES
( (
@ -166,6 +166,6 @@ BEGIN
@MaxAutoscaleSmSeats, @MaxAutoscaleSmSeats,
@MaxAutoscaleSmServiceAccounts, @MaxAutoscaleSmServiceAccounts,
@SecretsManagerBeta, @SecretsManagerBeta,
@LimitCollectionCdOwnerAdmin @LimitCollectionCreationDeletion
) )
END END

View File

@ -51,7 +51,7 @@
@MaxAutoscaleSmSeats INT = null, @MaxAutoscaleSmSeats INT = null,
@MaxAutoscaleSmServiceAccounts INT = null, @MaxAutoscaleSmServiceAccounts INT = null,
@SecretsManagerBeta BIT = 0, @SecretsManagerBeta BIT = 0,
@LimitCollectionCdOwnerAdmin BIT = 1 @LimitCollectionCreationDeletion BIT = 1
AS AS
BEGIN BEGIN
SET NOCOUNT ON SET NOCOUNT ON
@ -110,7 +110,7 @@ BEGIN
[MaxAutoscaleSmSeats] = @MaxAutoscaleSmSeats, [MaxAutoscaleSmSeats] = @MaxAutoscaleSmSeats,
[MaxAutoscaleSmServiceAccounts] = @MaxAutoscaleSmServiceAccounts, [MaxAutoscaleSmServiceAccounts] = @MaxAutoscaleSmServiceAccounts,
[SecretsManagerBeta] = @SecretsManagerBeta, [SecretsManagerBeta] = @SecretsManagerBeta,
[LimitCollectionCdOwnerAdmin] = @LimitCollectionCdOwnerAdmin [LimitCollectionCreationDeletion] = @LimitCollectionCreationDeletion
WHERE WHERE
[Id] = @Id [Id] = @Id
END END

View File

@ -51,7 +51,7 @@
[MaxAutoscaleSmSeats] INT NULL, [MaxAutoscaleSmSeats] INT NULL,
[MaxAutoscaleSmServiceAccounts] INT NULL, [MaxAutoscaleSmServiceAccounts] INT NULL,
[SecretsManagerBeta] BIT NOT NULL CONSTRAINT [DF_Organization_SecretsManagerBeta] DEFAULT (0), [SecretsManagerBeta] BIT NOT NULL CONSTRAINT [DF_Organization_SecretsManagerBeta] DEFAULT (0),
[LimitCollectionCdOwnerAdmin] BIT NOT NULL CONSTRAINT [DF_Organization_LimitCollectionCdOwnerAdmin] DEFAULT (1), [LimitCollectionCreationDeletion] BIT NOT NULL CONSTRAINT [DF_Organization_LimitCollectionCreationDeletion] DEFAULT (1),
CONSTRAINT [PK_Organization] PRIMARY KEY CLUSTERED ([Id] ASC) CONSTRAINT [PK_Organization] PRIMARY KEY CLUSTERED ([Id] ASC)
); );

View File

@ -45,7 +45,7 @@ SELECT
O.[UsePasswordManager], O.[UsePasswordManager],
O.[SmSeats], O.[SmSeats],
O.[SmServiceAccounts], O.[SmServiceAccounts],
O.[LimitCollectionCdOwnerAdmin] O.[LimitCollectionCreationDeletion]
FROM FROM
[dbo].[OrganizationUser] OU [dbo].[OrganizationUser] OU
LEFT JOIN LEFT JOIN

View File

@ -69,7 +69,7 @@ public class CollectionAuthorizationHandlerTests
organization.Type = userType; organization.Type = userType;
organization.Permissions.CreateNewCollections = createNewCollection; organization.Permissions.CreateNewCollections = createNewCollection;
organization.LimitCollectionCdOwnerAdmin = limitCollectionCreateDelete; organization.LimitCollectionCreationDeletion = limitCollectionCreateDelete;
var context = new AuthorizationHandlerContext( var context = new AuthorizationHandlerContext(
new[] { CollectionOperations.Create }, new[] { CollectionOperations.Create },
@ -104,7 +104,7 @@ public class CollectionAuthorizationHandlerTests
organization.Type = userType; organization.Type = userType;
organization.Permissions.DeleteAnyCollection = deleteAnyCollection; organization.Permissions.DeleteAnyCollection = deleteAnyCollection;
organization.LimitCollectionCdOwnerAdmin = limitCollectionCreateDelete; organization.LimitCollectionCreationDeletion = limitCollectionCreateDelete;
var context = new AuthorizationHandlerContext( var context = new AuthorizationHandlerContext(
new[] { CollectionOperations.Delete }, new[] { CollectionOperations.Delete },

View File

@ -1,10 +1,10 @@
--Add column 'LimitCollectionCdOwnerAdmin' to 'Organization' table --Add column 'LimitCollectionCreationDeletion' to 'Organization' table
IF COL_LENGTH('[dbo].[Organization]', 'LimitCollectionCdOwnerAdmin') IS NULL IF COL_LENGTH('[dbo].[Organization]', 'LimitCollectionCreationDeletion') IS NULL
BEGIN BEGIN
ALTER TABLE ALTER TABLE
[dbo].[Organization] [dbo].[Organization]
ADD ADD
[LimitCollectionCdOwnerAdmin] BIT NOT NULL CONSTRAINT [DF_Organization_LimitCollectionCdOwnerAdmin] DEFAULT (1) [LimitCollectionCreationDeletion] BIT NOT NULL CONSTRAINT [DF_Organization_LimitCollectionCreationDeletion] DEFAULT (1)
END END
GO GO
@ -13,7 +13,7 @@ GO
ORGANIZATION STORED PROCEDURES ORGANIZATION STORED PROCEDURES
*/ */
--Alter `Organization_Create` sproc to include `LimitCollectionCdOwnerAdmin` column and default value --Alter `Organization_Create` sproc to include `LimitCollectionCreationDeletion` column and default value
CREATE OR ALTER PROCEDURE [dbo].[Organization_Create] CREATE OR ALTER PROCEDURE [dbo].[Organization_Create]
@Id UNIQUEIDENTIFIER OUTPUT, @Id UNIQUEIDENTIFIER OUTPUT,
@Identifier NVARCHAR(50), @Identifier NVARCHAR(50),
@ -67,7 +67,7 @@ CREATE OR ALTER PROCEDURE [dbo].[Organization_Create]
@MaxAutoscaleSmSeats INT= null, @MaxAutoscaleSmSeats INT= null,
@MaxAutoscaleSmServiceAccounts INT = null, @MaxAutoscaleSmServiceAccounts INT = null,
@SecretsManagerBeta BIT = 0, @SecretsManagerBeta BIT = 0,
@LimitCollectionCdOwnerAdmin BIT = 0 @LimitCollectionCreationDeletion BIT = 0
AS AS
BEGIN BEGIN
SET NOCOUNT ON SET NOCOUNT ON
@ -126,7 +126,7 @@ BEGIN
[MaxAutoscaleSmSeats], [MaxAutoscaleSmSeats],
[MaxAutoscaleSmServiceAccounts], [MaxAutoscaleSmServiceAccounts],
[SecretsManagerBeta], [SecretsManagerBeta],
[LimitCollectionCdOwnerAdmin] [LimitCollectionCreationDeletion]
) )
VALUES VALUES
( (
@ -182,12 +182,12 @@ BEGIN
@MaxAutoscaleSmSeats, @MaxAutoscaleSmSeats,
@MaxAutoscaleSmServiceAccounts, @MaxAutoscaleSmServiceAccounts,
@SecretsManagerBeta, @SecretsManagerBeta,
@LimitCollectionCdOwnerAdmin @LimitCollectionCreationDeletion
) )
END END
GO GO
--Alter `Organization_Update` sproc to include `LimitCollectionCdOwnerAdmin` column --Alter `Organization_Update` sproc to include `LimitCollectionCreationDeletion` column
CREATE OR ALTER PROCEDURE [dbo].[Organization_Update] CREATE OR ALTER PROCEDURE [dbo].[Organization_Update]
@Id UNIQUEIDENTIFIER, @Id UNIQUEIDENTIFIER,
@Identifier NVARCHAR(50), @Identifier NVARCHAR(50),
@ -241,7 +241,7 @@ CREATE OR ALTER PROCEDURE [dbo].[Organization_Update]
@MaxAutoscaleSmSeats INT = null, @MaxAutoscaleSmSeats INT = null,
@MaxAutoscaleSmServiceAccounts INT = null, @MaxAutoscaleSmServiceAccounts INT = null,
@SecretsManagerBeta BIT = 0, @SecretsManagerBeta BIT = 0,
@LimitCollectionCdOwnerAdmin BIT = 1 @LimitCollectionCreationDeletion BIT = 1
AS AS
BEGIN BEGIN
SET NOCOUNT ON SET NOCOUNT ON
@ -300,7 +300,7 @@ BEGIN
[MaxAutoscaleSmSeats] = @MaxAutoscaleSmSeats, [MaxAutoscaleSmSeats] = @MaxAutoscaleSmSeats,
[MaxAutoscaleSmServiceAccounts] = @MaxAutoscaleSmServiceAccounts, [MaxAutoscaleSmServiceAccounts] = @MaxAutoscaleSmServiceAccounts,
[SecretsManagerBeta] = @SecretsManagerBeta, [SecretsManagerBeta] = @SecretsManagerBeta,
[LimitCollectionCdOwnerAdmin] = @LimitCollectionCdOwnerAdmin [LimitCollectionCreationDeletion] = @LimitCollectionCreationDeletion
WHERE WHERE
[Id] = @Id [Id] = @Id
END END
@ -311,7 +311,7 @@ GO
ORGANIZATION VIEWS ORGANIZATION VIEWS
*/ */
--Add 'LimitCollectionCdOwnerAdmin` to OrganizationUserOrganizationDetailsView --Add 'LimitCollectionCreationDeletion` to OrganizationUserOrganizationDetailsView
CREATE OR ALTER VIEW [dbo].[OrganizationUserOrganizationDetailsView] CREATE OR ALTER VIEW [dbo].[OrganizationUserOrganizationDetailsView]
AS AS
SELECT SELECT
@ -359,7 +359,7 @@ SELECT
O.[UsePasswordManager], O.[UsePasswordManager],
O.[SmSeats], O.[SmSeats],
O.[SmServiceAccounts], O.[SmServiceAccounts],
O.[LimitCollectionCdOwnerAdmin] O.[LimitCollectionCreationDeletion]
FROM FROM
[dbo].[OrganizationUser] OU [dbo].[OrganizationUser] OU
LEFT JOIN LEFT JOIN

View File

@ -567,7 +567,7 @@ namespace Bit.MySqlMigrations.Migrations
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("varchar(100)"); .HasColumnType("varchar(100)");
b.Property<bool>("LimitCollectionCdOwnerAdmin") b.Property<bool>("LimitCollectionCreationDeletion")
.HasColumnType("tinyint(1)") .HasColumnType("tinyint(1)")
.HasDefaultValue(true); .HasDefaultValue(true);

View File

@ -11,7 +11,7 @@ public partial class LimitCollectionCreateDelete : Migration
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.AddColumn<bool>( migrationBuilder.AddColumn<bool>(
name: "LimitCollectionCdOwnerAdmin", name: "LimitCollectionCreationDeletion",
table: "Organization", table: "Organization",
type: "tinyint(1)", type: "tinyint(1)",
nullable: false, nullable: false,
@ -22,7 +22,7 @@ public partial class LimitCollectionCreateDelete : Migration
protected override void Down(MigrationBuilder migrationBuilder) protected override void Down(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.DropColumn( migrationBuilder.DropColumn(
name: "LimitCollectionCdOwnerAdmin", name: "LimitCollectionCreationDeletion",
table: "Organization"); table: "Organization");
} }
} }

View File

@ -570,7 +570,7 @@ namespace Bit.MySqlMigrations.Migrations
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("varchar(100)"); .HasColumnType("varchar(100)");
b.Property<bool>("LimitCollectionCdOwnerAdmin") b.Property<bool>("LimitCollectionCreationDeletion")
.HasColumnType("tinyint(1)") .HasColumnType("tinyint(1)")
.HasDefaultValue(true); .HasDefaultValue(true);

View File

@ -577,7 +577,7 @@ namespace Bit.PostgresMigrations.Migrations
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("character varying(100)"); .HasColumnType("character varying(100)");
b.Property<bool>("LimitCollectionCdOwnerAdmin") b.Property<bool>("LimitCollectionCreationDeletion")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasDefaultValue(true); .HasDefaultValue(true);

View File

@ -11,7 +11,7 @@ public partial class LimitCollectionCreateDelete : Migration
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.AddColumn<bool>( migrationBuilder.AddColumn<bool>(
name: "LimitCollectionCdOwnerAdmin", name: "LimitCollectionCreationDeletion",
table: "Organization", table: "Organization",
type: "boolean", type: "boolean",
nullable: false, nullable: false,
@ -22,7 +22,7 @@ public partial class LimitCollectionCreateDelete : Migration
protected override void Down(MigrationBuilder migrationBuilder) protected override void Down(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.DropColumn( migrationBuilder.DropColumn(
name: "LimitCollectionCdOwnerAdmin", name: "LimitCollectionCreationDeletion",
table: "Organization"); table: "Organization");
} }
} }

View File

@ -580,7 +580,7 @@ namespace Bit.PostgresMigrations.Migrations
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("character varying(100)"); .HasColumnType("character varying(100)");
b.Property<bool>("LimitCollectionCdOwnerAdmin") b.Property<bool>("LimitCollectionCreationDeletion")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasDefaultValue(true); .HasDefaultValue(true);

View File

@ -565,7 +565,7 @@ namespace Bit.SqliteMigrations.Migrations
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<bool>("LimitCollectionCdOwnerAdmin") b.Property<bool>("LimitCollectionCreationDeletion")
.HasColumnType("INTEGER") .HasColumnType("INTEGER")
.HasDefaultValue(true); .HasDefaultValue(true);

View File

@ -11,7 +11,7 @@ public partial class LimitCollectionCreateDelete : Migration
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.AddColumn<bool>( migrationBuilder.AddColumn<bool>(
name: "LimitCollectionCdOwnerAdmin", name: "LimitCollectionCreationDeletion",
table: "Organization", table: "Organization",
type: "INTEGER", type: "INTEGER",
nullable: false, nullable: false,
@ -22,7 +22,7 @@ public partial class LimitCollectionCreateDelete : Migration
protected override void Down(MigrationBuilder migrationBuilder) protected override void Down(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.DropColumn( migrationBuilder.DropColumn(
name: "LimitCollectionCdOwnerAdmin", name: "LimitCollectionCreationDeletion",
table: "Organization"); table: "Organization");
} }
} }

View File

@ -568,7 +568,7 @@ namespace Bit.SqliteMigrations.Migrations
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<bool>("LimitCollectionCdOwnerAdmin") b.Property<bool>("LimitCollectionCreationDeletion")
.HasColumnType("INTEGER") .HasColumnType("INTEGER")
.HasDefaultValue(true); .HasDefaultValue(true);