mirror of
https://github.com/bitwarden/server
synced 2025-12-13 14:53:34 +00:00
[PM-12485] Create OrganizationUpdateKeys command (#5600)
* Add OrganizationUpdateKeysCommand * Add unit tests for OrganizationUpdateKeysCommand to validate permission checks and key updates * Register OrganizationUpdateKeysCommand for dependency injection * Refactor OrganizationsController to use IOrganizationUpdateKeysCommand for updating organization keys * Remove outdated unit tests for UpdateOrganizationKeysAsync in OrganizationServiceTests * Remove UpdateOrganizationKeysAsync method from IOrganizationService and OrganizationService implementations * Add IOrganizationUpdateKeysCommand dependency mock to OrganizationsControllerTests
This commit is contained in:
@@ -60,6 +60,7 @@ public static class OrganizationServiceCollectionExtensions
|
||||
services.AddOrganizationDomainCommandsQueries();
|
||||
services.AddOrganizationSignUpCommands();
|
||||
services.AddOrganizationDeleteCommands();
|
||||
services.AddOrganizationUpdateCommands();
|
||||
services.AddOrganizationEnableCommands();
|
||||
services.AddOrganizationDisableCommands();
|
||||
services.AddOrganizationAuthCommands();
|
||||
@@ -77,6 +78,11 @@ public static class OrganizationServiceCollectionExtensions
|
||||
services.AddScoped<IOrganizationInitiateDeleteCommand, OrganizationInitiateDeleteCommand>();
|
||||
}
|
||||
|
||||
private static void AddOrganizationUpdateCommands(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<IOrganizationUpdateKeysCommand, OrganizationUpdateKeysCommand>();
|
||||
}
|
||||
|
||||
private static void AddOrganizationEnableCommands(this IServiceCollection services) =>
|
||||
services.AddScoped<IOrganizationEnableCommand, OrganizationEnableCommand>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user