mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 16:42:50 -05:00
remove user from group apis
This commit is contained in:
@ -14,5 +14,6 @@ namespace Bit.Core.Repositories
|
||||
Task<ICollection<Guid>> GetManyIdsByUserIdAsync(Guid organizationUserId);
|
||||
Task CreateAsync(Group obj, IEnumerable<Guid> collectionIds);
|
||||
Task ReplaceAsync(Group obj, IEnumerable<Guid> collectionIds);
|
||||
Task DeleteUserAsync(Guid groupId, Guid organizationUserId);
|
||||
}
|
||||
}
|
||||
|
@ -106,6 +106,17 @@ namespace Bit.Core.Repositories.SqlServer
|
||||
}
|
||||
}
|
||||
|
||||
public async Task DeleteUserAsync(Guid groupId, Guid organizationUserId)
|
||||
{
|
||||
using(var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.ExecuteAsync(
|
||||
$"[{Schema}].[GroupUser_Delete]",
|
||||
new { GroupId = groupId, OrganizationUserId = organizationUserId },
|
||||
commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
}
|
||||
|
||||
public class GroupWithCollections : Group
|
||||
{
|
||||
public DataTable CollectionIds { get; set; }
|
||||
|
Reference in New Issue
Block a user