1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 17:12:49 -05:00

purge org vault

This commit is contained in:
Kyle Spearrin
2018-09-25 09:12:50 -04:00
parent e34fe81857
commit 7164f378fc
10 changed files with 150 additions and 3 deletions

View File

@ -285,6 +285,17 @@ namespace Bit.Core.Services
await _pushService.PushSyncCipherUpdateAsync(cipher, null);
}
public async Task PurgeAsync(Guid organizationId)
{
var org = await _organizationRepository.GetByIdAsync(organizationId);
if(org == null)
{
throw new NotFoundException();
}
await _cipherRepository.DeleteByOrganizationIdAsync(organizationId);
await _eventService.LogOrganizationEventAsync(org, Enums.EventType.Organization_PurgedVault);
}
public async Task MoveManyAsync(IEnumerable<Guid> cipherIds, Guid? destinationFolderId, Guid movingUserId)
{
if(destinationFolderId.HasValue)