mirror of
https://github.com/bitwarden/server.git
synced 2025-05-08 13:12:16 -05:00
[PM-19383] admins unable to delete attachments (#5774)
* add admin endpoint, fix typecasting error * fix typecast issue * wip * cleanup * remove ternary statement
This commit is contained in:
parent
28467fc8f6
commit
ee2399f500
@ -891,7 +891,14 @@ public class CipherService : ICipherService
|
||||
|
||||
// Update the revision date when an attachment is deleted
|
||||
cipher.RevisionDate = DateTime.UtcNow;
|
||||
await _cipherRepository.ReplaceAsync(orgAdmin ? cipher : (CipherDetails)cipher);
|
||||
if (orgAdmin)
|
||||
{
|
||||
await _cipherRepository.ReplaceAsync(cipher);
|
||||
}
|
||||
else
|
||||
{
|
||||
await _cipherRepository.ReplaceAsync((CipherDetails)cipher);
|
||||
}
|
||||
|
||||
// push
|
||||
await _pushService.PushSyncCipherUpdateAsync(cipher, null);
|
||||
|
Loading…
x
Reference in New Issue
Block a user