mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 01:52:49 -05:00
Revert "Prevent manually adding SM to an MSP-managed org"
This change is no longer required
This reverts commit 51b086243b
.
This commit is contained in:
@ -5,7 +5,6 @@ using Bit.Admin.Utilities;
|
|||||||
using Bit.Core.Context;
|
using Bit.Core.Context;
|
||||||
using Bit.Core.Entities;
|
using Bit.Core.Entities;
|
||||||
using Bit.Core.Enums;
|
using Bit.Core.Enums;
|
||||||
using Bit.Core.Enums.Provider;
|
|
||||||
using Bit.Core.Exceptions;
|
using Bit.Core.Exceptions;
|
||||||
using Bit.Core.Models.OrganizationConnectionConfigs;
|
using Bit.Core.Models.OrganizationConnectionConfigs;
|
||||||
using Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
|
using Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
|
||||||
@ -209,12 +208,6 @@ public class OrganizationsController : Controller
|
|||||||
throw new BadRequestException("Plan does not support Secrets Manager");
|
throw new BadRequestException("Plan does not support Secrets Manager");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (organization.UseSecretsManager && model.Provider is { Type: ProviderType.Msp })
|
|
||||||
{
|
|
||||||
throw new BadRequestException(
|
|
||||||
"Organizations with a Managed Service Provider do not support Secrets Manager.");
|
|
||||||
}
|
|
||||||
|
|
||||||
await _organizationRepository.ReplaceAsync(organization);
|
await _organizationRepository.ReplaceAsync(organization);
|
||||||
await _applicationCacheService.UpsertOrganizationAbilityAsync(organization);
|
await _applicationCacheService.UpsertOrganizationAbilityAsync(organization);
|
||||||
await _referenceEventService.RaiseEventAsync(new ReferenceEvent(ReferenceEventType.OrganizationEditedByAdmin, organization, _currentContext)
|
await _referenceEventService.RaiseEventAsync(new ReferenceEvent(ReferenceEventType.OrganizationEditedByAdmin, organization, _currentContext)
|
||||||
|
Reference in New Issue
Block a user