mirror of
https://github.com/bitwarden/server.git
synced 2025-07-07 02:52:50 -05:00
PM-15091 Add Feature Flag to DB called UseRiskInsights (#5088)
Add a new column called UseRiskInsights to `dbo.Organization`
This commit is contained in:
@ -54,7 +54,8 @@ CREATE PROCEDURE [dbo].[Organization_Create]
|
||||
@LimitCollectionCreationDeletion BIT = NULL, -- Deprecated https://bitwarden.atlassian.net/browse/PM-10863
|
||||
@LimitCollectionCreation BIT = NULL,
|
||||
@LimitCollectionDeletion BIT = NULL,
|
||||
@AllowAdminAccessToAllCollectionItems BIT = 0
|
||||
@AllowAdminAccessToAllCollectionItems BIT = 0,
|
||||
@UseRiskInsights BIT = 0
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
@ -119,7 +120,8 @@ BEGIN
|
||||
[LimitCollectionCreationDeletion], -- Deprecated https://bitwarden.atlassian.net/browse/PM-10863
|
||||
[LimitCollectionCreation],
|
||||
[LimitCollectionDeletion],
|
||||
[AllowAdminAccessToAllCollectionItems]
|
||||
[AllowAdminAccessToAllCollectionItems],
|
||||
[UseRiskInsights]
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@ -178,6 +180,7 @@ BEGIN
|
||||
COALESCE(@LimitCollectionCreation, @LimitCollectionDeletion, 0), -- Deprecated https://bitwarden.atlassian.net/browse/PM-10863)
|
||||
@LimitCollectionCreation,
|
||||
@LimitCollectionDeletion,
|
||||
@AllowAdminAccessToAllCollectionItems
|
||||
@AllowAdminAccessToAllCollectionItems,
|
||||
@UseRiskInsights
|
||||
)
|
||||
END
|
||||
|
@ -24,7 +24,8 @@ BEGIN
|
||||
[LimitCollectionCreationDeletion], -- Deprecated https://bitwarden.atlassian.net/browse/PM-10863
|
||||
[LimitCollectionCreation],
|
||||
[LimitCollectionDeletion],
|
||||
[AllowAdminAccessToAllCollectionItems]
|
||||
[AllowAdminAccessToAllCollectionItems],
|
||||
[UseRiskInsights]
|
||||
FROM
|
||||
[dbo].[Organization]
|
||||
END
|
||||
|
@ -54,7 +54,8 @@ CREATE PROCEDURE [dbo].[Organization_Update]
|
||||
@LimitCollectionCreationDeletion BIT = null, -- Deprecated https://bitwarden.atlassian.net/browse/PM-10863
|
||||
@LimitCollectionCreation BIT = null,
|
||||
@LimitCollectionDeletion BIT = null,
|
||||
@AllowAdminAccessToAllCollectionItems BIT = 0
|
||||
@AllowAdminAccessToAllCollectionItems BIT = 0,
|
||||
@UseRiskInsights BIT = 0
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
@ -119,7 +120,8 @@ BEGIN
|
||||
[LimitCollectionCreationDeletion] = COALESCE(@LimitCollectionCreation, @LimitCollectionDeletion, 0),
|
||||
[LimitCollectionCreation] = @LimitCollectionCreation,
|
||||
[LimitCollectionDeletion] = @LimitCollectionDeletion,
|
||||
[AllowAdminAccessToAllCollectionItems] = @AllowAdminAccessToAllCollectionItems
|
||||
[AllowAdminAccessToAllCollectionItems] = @AllowAdminAccessToAllCollectionItems,
|
||||
[UseRiskInsights] = @UseRiskInsights
|
||||
WHERE
|
||||
[Id] = @Id
|
||||
END
|
||||
|
@ -55,6 +55,7 @@ CREATE TABLE [dbo].[Organization] (
|
||||
[LimitCollectionCreation] BIT NOT NULL CONSTRAINT [DF_Organization_LimitCollectionCreation] DEFAULT (0),
|
||||
[LimitCollectionDeletion] BIT NOT NULL CONSTRAINT [DF_Organization_LimitCollectionDeletion] DEFAULT (0),
|
||||
[AllowAdminAccessToAllCollectionItems] BIT NOT NULL CONSTRAINT [DF_Organization_AllowAdminAccessToAllCollectionItems] DEFAULT (0),
|
||||
[UseRiskInsights] BIT NOT NULL CONSTRAINT [DF_Organization_UseRiskInsights] DEFAULT (0),
|
||||
CONSTRAINT [PK_Organization] PRIMARY KEY CLUSTERED ([Id] ASC)
|
||||
);
|
||||
|
||||
|
@ -49,7 +49,8 @@ SELECT
|
||||
O.[LimitCollectionCreationDeletion], -- Deprecated https://bitwarden.atlassian.net/browse/PM-10863
|
||||
O.[LimitCollectionCreation],
|
||||
O.[LimitCollectionDeletion],
|
||||
O.[AllowAdminAccessToAllCollectionItems]
|
||||
O.[AllowAdminAccessToAllCollectionItems],
|
||||
O.[UseRiskInsights]
|
||||
FROM
|
||||
[dbo].[OrganizationUser] OU
|
||||
LEFT JOIN
|
||||
|
@ -35,7 +35,8 @@ SELECT
|
||||
O.[LimitCollectionCreationDeletion], -- Deprecated https://bitwarden.atlassian.net/browse/PM-10863
|
||||
O.[LimitCollectionCreation],
|
||||
O.[LimitCollectionDeletion],
|
||||
O.[AllowAdminAccessToAllCollectionItems]
|
||||
O.[AllowAdminAccessToAllCollectionItems],
|
||||
O.[UseRiskInsights]
|
||||
FROM
|
||||
[dbo].[ProviderUser] PU
|
||||
INNER JOIN
|
||||
|
Reference in New Issue
Block a user