mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
[AC-2489] Resolve SM Standalone issues with SCIM & Directory Connector (#4011)
* Add auto-scale support to standalone SM for SCIM * Mark users for SM when using SM Stadalone with Directory Connector
This commit is contained in:
@ -57,4 +57,5 @@ public interface IPaymentService
|
||||
Task<string> AddSecretsManagerToSubscription(Organization org, Plan plan, int additionalSmSeats,
|
||||
int additionalServiceAccount, DateTime? prorationDate = null);
|
||||
Task<bool> RisksSubscriptionFailure(Organization organization);
|
||||
Task<bool> HasSecretsManagerStandalone(Organization organization);
|
||||
}
|
||||
|
@ -1800,6 +1800,18 @@ public class StripePaymentService : IPaymentService
|
||||
return paymentSource == null;
|
||||
}
|
||||
|
||||
public async Task<bool> HasSecretsManagerStandalone(Organization organization)
|
||||
{
|
||||
if (string.IsNullOrEmpty(organization.GatewayCustomerId))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var customer = await _stripeAdapter.CustomerGetAsync(organization.GatewayCustomerId);
|
||||
|
||||
return customer?.Discount?.Coupon?.Id == SecretsManagerStandaloneDiscountId;
|
||||
}
|
||||
|
||||
private PaymentMethod GetLatestCardPaymentMethod(string customerId)
|
||||
{
|
||||
var cardPaymentMethods = _stripeAdapter.PaymentMethodListAutoPaging(
|
||||
|
Reference in New Issue
Block a user