mirror of
https://github.com/bitwarden/server.git
synced 2025-07-17 23:50:58 -05:00
org context checks in org apis. remove depr. code
This commit is contained in:
@ -7,7 +7,6 @@ namespace Bit.Core.Repositories
|
||||
{
|
||||
public interface IOrganizationRepository : IRepository<Organization, Guid>
|
||||
{
|
||||
Task<Organization> GetByIdAsync(Guid id, Guid userId);
|
||||
Task<ICollection<Organization>> GetManyByUserIdAsync(Guid userId);
|
||||
}
|
||||
}
|
||||
|
@ -19,19 +19,6 @@ namespace Bit.Core.Repositories.SqlServer
|
||||
: base(connectionString)
|
||||
{ }
|
||||
|
||||
public async Task<Organization> GetByIdAsync(Guid id, Guid userId)
|
||||
{
|
||||
using(var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.QueryAsync<Organization>(
|
||||
"[dbo].[Organization_ReadByIdUserId]",
|
||||
new { Id = id, UserId = userId },
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
return results.SingleOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<ICollection<Organization>> GetManyByUserIdAsync(Guid userId)
|
||||
{
|
||||
using(var connection = new SqlConnection(ConnectionString))
|
||||
|
Reference in New Issue
Block a user