diff --git a/apps/browser/src/tools/popup/settings/about-page/more-from-bitwarden-page-v2.component.ts b/apps/browser/src/tools/popup/settings/about-page/more-from-bitwarden-page-v2.component.ts index 0f05480ea123..7cdb691d56ca 100644 --- a/apps/browser/src/tools/popup/settings/about-page/more-from-bitwarden-page-v2.component.ts +++ b/apps/browser/src/tools/popup/settings/about-page/more-from-bitwarden-page-v2.component.ts @@ -38,7 +38,7 @@ export class MoreFromBitwardenPageV2Component { private organizationService: OrganizationService, ) { this.canAccessPremium$ = billingAccountProfileStateService.hasPremiumFromAnySource$; - this.familySponsorshipAvailable$ = this.organizationService.canManageSponsorships$; + this.familySponsorshipAvailable$ = this.organizationService.familySponsorshipAvailable$; } async openFreeBitwardenFamiliesPage() { diff --git a/libs/common/src/admin-console/abstractions/organization/organization.service.abstraction.ts b/libs/common/src/admin-console/abstractions/organization/organization.service.abstraction.ts index 0cea2aee5399..a2ea6aa88610 100644 --- a/libs/common/src/admin-console/abstractions/organization/organization.service.abstraction.ts +++ b/libs/common/src/admin-console/abstractions/organization/organization.service.abstraction.ts @@ -117,6 +117,10 @@ export abstract class OrganizationService { * Emits true if the user can create or manage a Free Bitwarden Families sponsorship. */ canManageSponsorships$: Observable; + /** + * Emits true if any of the user's organizations have a Free Bitwarden Families sponsorship available. + */ + familySponsorshipAvailable$: Observable; hasOrganizations: () => Promise; get$: (id: string) => Observable; get: (id: string) => Promise; diff --git a/libs/common/src/admin-console/services/organization/organization.service.ts b/libs/common/src/admin-console/services/organization/organization.service.ts index d8fe18dc5cbf..91bfcbd0d5de 100644 --- a/libs/common/src/admin-console/services/organization/organization.service.ts +++ b/libs/common/src/admin-console/services/organization/organization.service.ts @@ -88,6 +88,10 @@ export class OrganizationService implements InternalOrganizationServiceAbstracti mapToBooleanHasAnyOrganizations(), ); + familySponsorshipAvailable$ = this.organizations$.pipe( + map((orgs) => orgs.some((o) => o.familySponsorshipAvailable)), + ); + async hasOrganizations(): Promise { return await firstValueFrom(this.organizations$.pipe(mapToBooleanHasAnyOrganizations())); }