1
0
mirror of https://github.com/bitwarden/server synced 2025-12-10 05:13:48 +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

@@ -85,4 +85,19 @@ public class SecurityTaskRepository : Repository<SecurityTask, Guid>, ISecurityT
return tasksList;
}
/// <inheritdoc />
public async Task MarkAsCompleteByCipherIds(IEnumerable<Guid> cipherIds)
{
if (!cipherIds.Any())
{
return;
}
await using var connection = new SqlConnection(ConnectionString);
await connection.ExecuteAsync(
$"[{Schema}].[SecurityTask_MarkCompleteByCipherIds]",
new { CipherIds = cipherIds.ToGuidIdArrayTVP() },
commandType: CommandType.StoredProcedure);
}
}