1
0
mirror of https://github.com/bitwarden/server synced 2025-12-16 00:03:54 +00:00

when ciphers are soft deleted, complete any associated security tasks (#6492)

This commit is contained in:
Nick Krantz
2025-11-06 08:28:13 -06:00
committed by GitHub
parent a1be1ae40b
commit 087c6915e7
8 changed files with 240 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
CREATE OR ALTER PROCEDURE [dbo].[SecurityTask_MarkCompleteByCipherIds]
@CipherIds AS [dbo].[GuidIdArray] READONLY
AS
BEGIN
SET NOCOUNT ON
UPDATE
[dbo].[SecurityTask]
SET
[Status] = 1, -- Completed
[RevisionDate] = SYSUTCDATETIME()
WHERE
[CipherId] IN (SELECT [Id] FROM @CipherIds)
AND [Status] <> 1 -- Not already completed
END