1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-17 23:50:58 -05:00

user checks on read procs

This commit is contained in:
Kyle Spearrin
2017-03-21 21:13:20 -04:00
parent ed8d5d69a4
commit d266da1084
8 changed files with 50 additions and 20 deletions

View File

@ -28,11 +28,11 @@ namespace Bit.Core.Repositories.SqlServer
using(var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync<CipherDetails>(
$"[{Schema}].[CipherDetails_ReadById]",
new { Id = id },
$"[{Schema}].[CipherDetails_ReadByIdUserId]",
new { Id = id, UserId = userId },
commandType: CommandType.StoredProcedure);
return results.FirstOrDefault(c => c.UserId == userId);
return results.FirstOrDefault();
}
}