mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 16:42:50 -05:00
Check canScale when scaling for sso (#1661)
* Check canScale when scaling for sso * PR review Use AutoAddSeats to add seats in a consistent way. This requires moving user check out of that method. * User logic moved out of method
This commit is contained in:
@ -483,12 +483,7 @@ namespace Bit.Sso.Controllers
|
||||
throw new Exception("Cannot autoscale on self-hosted instance.");
|
||||
}
|
||||
|
||||
var paymentIntentClientSecret = await _organizationService.AdjustSeatsAsync(orgId, 1, prorationDate);
|
||||
organization = await _organizationRepository.GetByIdAsync(orgId);
|
||||
if (!string.IsNullOrEmpty(paymentIntentClientSecret))
|
||||
{
|
||||
throw new Exception("Stripe payment required client-side confirmation.");
|
||||
}
|
||||
await _organizationService.AutoAddSeatsAsync(organization, 1, prorationDate);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user