mirror of
https://github.com/bitwarden/server
synced 2025-12-17 16:53:23 +00:00
[AC-2799] Finalize sprocs that added the Manage permission (2 of 3) (#4452)
Update repository code to use non-v2 sprocs
This commit is contained in:
@@ -142,7 +142,7 @@ public class GroupRepository : Repository<Group, Guid>, IGroupRepository
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.ExecuteAsync(
|
||||
$"[{Schema}].[Group_CreateWithCollections_V2]",
|
||||
$"[{Schema}].[Group_CreateWithCollections]",
|
||||
objWithCollections,
|
||||
commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
@@ -156,7 +156,7 @@ public class GroupRepository : Repository<Group, Guid>, IGroupRepository
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.ExecuteAsync(
|
||||
$"[{Schema}].[Group_UpdateWithCollections_V2]",
|
||||
$"[{Schema}].[Group_UpdateWithCollections]",
|
||||
objWithCollections,
|
||||
commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ public class OrganizationUserRepository : Repository<OrganizationUser, Guid>, IO
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.ExecuteAsync(
|
||||
$"[{Schema}].[OrganizationUser_CreateWithCollections_V2]",
|
||||
$"[{Schema}].[OrganizationUser_CreateWithCollections]",
|
||||
objWithCollections,
|
||||
commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
@@ -346,7 +346,7 @@ public class OrganizationUserRepository : Repository<OrganizationUser, Guid>, IO
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.ExecuteAsync(
|
||||
$"[{Schema}].[OrganizationUser_UpdateWithCollections_V2]",
|
||||
$"[{Schema}].[OrganizationUser_UpdateWithCollections]",
|
||||
objWithCollections,
|
||||
commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ public class CollectionRepository : Repository<Collection, Guid>, ICollectionRep
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.ExecuteAsync(
|
||||
$"[{Schema}].[Collection_CreateWithGroupsAndUsers_V2]",
|
||||
$"[{Schema}].[Collection_CreateWithGroupsAndUsers]",
|
||||
objWithGroupsAndUsers,
|
||||
commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ public class CollectionRepository : Repository<Collection, Guid>, ICollectionRep
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.ExecuteAsync(
|
||||
$"[{Schema}].[Collection_UpdateWithGroupsAndUsers_V2]",
|
||||
$"[{Schema}].[Collection_UpdateWithGroupsAndUsers]",
|
||||
objWithGroupsAndUsers,
|
||||
commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
@@ -290,7 +290,7 @@ public class CollectionRepository : Repository<Collection, Guid>, ICollectionRep
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.ExecuteAsync(
|
||||
$"[{Schema}].[CollectionUser_UpdateUsers_V2]",
|
||||
$"[{Schema}].[CollectionUser_UpdateUsers]",
|
||||
new { CollectionId = id, Users = users.ToArrayTVP() },
|
||||
commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user