mirror of
https://github.com/bitwarden/server
synced 2025-12-15 15:53:59 +00:00
updates to soft delete
This commit is contained in:
@@ -718,13 +718,10 @@ public class CipherService : ICipherService
|
||||
|
||||
cipherDetails.DeletedDate = cipherDetails.RevisionDate = DateTime.UtcNow;
|
||||
|
||||
if (cipherDetails.ArchivedDate.HasValue)
|
||||
{
|
||||
// If the cipher was archived, clear the archived date when soft deleting
|
||||
// If a user were to restore an archived cipher, it should go back to the vault not the archive vault
|
||||
cipherDetails.ArchivedDate = null;
|
||||
cipherDetails.Archives = null;
|
||||
}
|
||||
// Clear the archived date and archives when soft deleting
|
||||
// If a user were to restore an archived cipher, it should go back to the vault not the archive vault
|
||||
cipherDetails.ArchivedDate = null;
|
||||
cipherDetails.Archives = null;
|
||||
|
||||
await _securityTaskRepository.MarkAsCompleteByCipherIds([cipherDetails.Id]);
|
||||
await _cipherRepository.UpsertAsync(cipherDetails);
|
||||
|
||||
Reference in New Issue
Block a user