From d5da5bbe19cdc72dc83118cd2d6d2c446277eb11 Mon Sep 17 00:00:00 2001 From: Vincent Salucci Date: Thu, 24 Aug 2023 10:47:11 -0500 Subject: [PATCH] fix: merge conflict resolution --- .../Controllers/OrganizationsController.cs | 35 +------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/Api/Controllers/OrganizationsController.cs b/src/Api/Controllers/OrganizationsController.cs index a00de42345..491e1526d4 100644 --- a/src/Api/Controllers/OrganizationsController.cs +++ b/src/Api/Controllers/OrganizationsController.cs @@ -763,40 +763,7 @@ public class OrganizationsController : Controller return new OrganizationSsoResponseModel(organization, _globalSettings, ssoConfig); } - - // This is a temporary endpoint to self-enroll in secrets manager - [SelfHosted(NotSelfHostedOnly = true)] - [HttpPost("{id}/enroll-secrets-manager")] - public async Task EnrollSecretsManager(Guid id, [FromBody] OrganizationEnrollSecretsManagerRequestModel model) - { - var userId = _userService.GetProperUserId(User).Value; - if (!await _currentContext.OrganizationAdmin(id)) - { - throw new NotFoundException(); - } - - var organization = await _organizationRepository.GetByIdAsync(id); - if (organization == null) - { - throw new NotFoundException(); - } - - organization.UseSecretsManager = model.Enabled; - organization.SecretsManagerBeta = model.Enabled; - await _organizationService.UpdateAsync(organization); - - // Turn on Secrets Manager for the user - if (model.Enabled) - { - var orgUser = await _organizationUserRepository.GetByOrganizationAsync(id, userId); - if (orgUser != null) - { - orgUser.AccessSecretsManager = true; - await _organizationUserRepository.ReplaceAsync(orgUser); - } - } - } - + [HttpPut("{id}/collection-management")] public async Task PutCollectionManagement(Guid id, [FromBody] OrganizationCollectionManagementUpdateRequestModel model) {