mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42: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:
@ -14,11 +14,12 @@ public class SecretsManagerSubscriptionUpdateRequestModel
|
||||
|
||||
public virtual SecretsManagerSubscriptionUpdate ToSecretsManagerSubscriptionUpdate(Organization organization)
|
||||
{
|
||||
var orgUpdate = new SecretsManagerSubscriptionUpdate(
|
||||
organization,
|
||||
seatAdjustment: SeatAdjustment, maxAutoscaleSeats: MaxAutoscaleSeats,
|
||||
serviceAccountAdjustment: ServiceAccountAdjustment, maxAutoscaleServiceAccounts: MaxAutoscaleServiceAccounts);
|
||||
|
||||
return orgUpdate;
|
||||
return new SecretsManagerSubscriptionUpdate(organization, false)
|
||||
{
|
||||
MaxAutoscaleSmSeats = MaxAutoscaleSeats,
|
||||
MaxAutoscaleSmServiceAccounts = MaxAutoscaleServiceAccounts
|
||||
}
|
||||
.AdjustSeats(SeatAdjustment)
|
||||
.AdjustServiceAccounts(ServiceAccountAdjustment);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user