mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 09:02:48 -05:00
[AC-1568] Finish refactor of update subscription interface, minor fixes (#3189)
* Remove UpdateSecretsManagerSubscriptionCommand.AdjustServiceAccounts interface * Rewrite tests and use autofixture customizations * Reduce method nesting in the command, simplify parameters * Fix capitalization and wording of error messages * Add checks for existing SM beta enrolment etc
This commit is contained in:
@ -62,6 +62,17 @@ public class AddSecretsManagerSubscriptionCommand : IAddSecretsManagerSubscripti
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
if (organization.SecretsManagerBeta)
|
||||
{
|
||||
throw new BadRequestException("Organization is enrolled in Secrets Manager Beta. " +
|
||||
"Please contact Customer Success to add Secrets Manager to your subscription.");
|
||||
}
|
||||
|
||||
if (organization.UseSecretsManager)
|
||||
{
|
||||
throw new BadRequestException("Organization already uses Secrets Manager.");
|
||||
}
|
||||
|
||||
var plan = StaticStore.GetSecretsManagerPlan(organization.PlanType);
|
||||
if (string.IsNullOrWhiteSpace(organization.GatewayCustomerId) && plan.Product != ProductType.Free)
|
||||
{
|
||||
|
Reference in New Issue
Block a user