1
0
mirror of https://github.com/bitwarden/server synced 2025-12-30 07:03:42 +00: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

@@ -217,6 +217,17 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task DeleteByOrganizationIdAsync(Guid organizationId)
{
using(var connection = new SqlConnection(ConnectionString))
{
var results = await connection.ExecuteAsync(
$"[{Schema}].[Cipher_DeleteByOrganizationId]",
new { OrganizationId = organizationId },
commandType: CommandType.StoredProcedure);
}
}
public Task UpdateUserKeysAndCiphersAsync(User user, IEnumerable<Cipher> ciphers, IEnumerable<Folder> folders)
{
using(var connection = new SqlConnection(ConnectionString))