1
0
mirror of https://github.com/bitwarden/server synced 2025-12-20 10:13:39 +00:00

Add sponsorship available boolean to orgDetails

This commit is contained in:
Matt Gibson
2021-11-08 19:06:32 -05:00
committed by Justin Baur
parent 45f6ec1781
commit d8e986b27b
6 changed files with 14 additions and 2 deletions

View File

@@ -39,6 +39,9 @@ namespace Bit.Core.Models.Api
ProviderId = organization.ProviderId?.ToString();
ProviderName = organization.ProviderName;
FamilySponsorshipFriendlyName = organization.FamilySponsorshipFriendlyName;
FamilySponsorshipAvailable = FamilySponsorshipFriendlyName == null &&
Utilities.StaticStore.GetSponsoredPlan(PlanSponsorshipType.FamiliesForEnterprise)
.UsersCanSponsor(organization);
}
public string Id { get; set; }
@@ -70,5 +73,6 @@ namespace Bit.Core.Models.Api
public string ProviderId { get; set; }
public string ProviderName { get; set; }
public string FamilySponsorshipFriendlyName { get; set; }
public bool FamilySponsorshipAvailable { get; set; }
}
}