1
0
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:
Kyle Spearrin
2017-05-09 19:24:03 -04:00
parent 7a4d20ac1f
commit 540773eb36
8 changed files with 48 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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; }