mirror of
https://github.com/bitwarden/server
synced 2025-12-15 07:43:54 +00:00
* [EC-654] Add CreateGroupCommand and UpdateGroupCommand Added new CQRS commands CreateGroupCommand and UpdateGroupCommand Updated GroupService to use new commands Edited existing GroupServiceTests and added new tests for the new commands * [EC-654] dotnet format * [EC-654] Replace GroupService.SaveAsync with CreateGroup and UpdateGroup commands * [EC-654] Add assertions to check calls on IReferenceEventService * [EC-654] Use AssertHelper.AssertRecent for DateTime properties * [EC-654] Extracted database reads from CreateGroupCommand and UpdateGroupCommand. Added unit tests. * [EC-654] Changed CreateGroupCommand and UpdateGroupCommand Validate method to private
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using Bit.Core.OrganizationFeatures.OrganizationUsers;
|
|
using Bit.Core.OrganizationFeatures.OrganizationUsers.Interfaces;
|
|
using Bit.Scim.Groups;
|
|
using Bit.Scim.Groups.Interfaces;
|
|
using Bit.Scim.Users;
|
|
using Bit.Scim.Users.Interfaces;
|
|
|
|
namespace Bit.Scim.Utilities;
|
|
|
|
public static class ScimServiceCollectionExtensions
|
|
{
|
|
public static void AddScimGroupCommands(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<IPatchGroupCommand, PatchGroupCommand>();
|
|
services.AddScoped<IPostGroupCommand, PostGroupCommand>();
|
|
services.AddScoped<IPutGroupCommand, PutGroupCommand>();
|
|
}
|
|
|
|
public static void AddScimGroupQueries(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<IGetGroupsListQuery, GetGroupsListQuery>();
|
|
}
|
|
|
|
public static void AddScimUserCommands(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<IDeleteOrganizationUserCommand, DeleteOrganizationUserCommand>();
|
|
services.AddScoped<IPatchUserCommand, PatchUserCommand>();
|
|
services.AddScoped<IPostUserCommand, PostUserCommand>();
|
|
}
|
|
|
|
public static void AddScimUserQueries(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<IGetUsersListQuery, GetUsersListQuery>();
|
|
}
|
|
}
|