1
0
mirror of https://github.com/bitwarden/server synced 2026-01-05 01:53:17 +00:00

Removed DocumentDB repositories and domain type dependencies for them. Moved account registration process to not require email address verification in preparation for client app registration process.

This commit is contained in:
Kyle Spearrin
2016-02-20 23:25:44 -05:00
parent a523364844
commit 9914399e8b
28 changed files with 17 additions and 1054 deletions

View File

@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using Bit.Core.Repositories.SqlServer.Models;
using DataTableProxy;
using Bit.Core.Domains;
using System.Data;
namespace Bit.Core.Repositories.SqlServer
{
@@ -28,6 +29,9 @@ namespace Bit.Core.Repositories.SqlServer
return Task.FromResult(0);
}
// Get the id of the expected user
var userId = ((Cipher)ciphers.First()).UserId;
using(var connection = new SqlConnection(ConnectionString))
{
connection.Open();
@@ -92,6 +96,8 @@ namespace Bit.Core.Repositories.SqlServer
[dbo].[Folder] F
INNER JOIN
#TempFolder TF ON F.Id = TF.Id
WHERE
F.[UserId] = @UserId
UPDATE
[dbo].[Site]
@@ -109,12 +115,15 @@ namespace Bit.Core.Repositories.SqlServer
[dbo].[Site] S
INNER JOIN
#TempSite TS ON S.Id = TS.Id
WHERE
S.[UserId] = @UserId
DROP TABLE #TempFolder
DROP TABLE #TempSite";
using(var cmd = new SqlCommand(sqlUpdate, connection, transaction))
{
cmd.Parameters.Add("@UserId", SqlDbType.UniqueIdentifier).Value = new Guid(userId);
cmd.ExecuteNonQuery();
}