1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

[EC-859] update billing routes for owners of Managed orgs (#4611)

* [EC-859] update billing routes for owners of Managed orgs

* [EC-859] fix observable in billing tab

* [EC-859] update observable name

* [EC-859] update reporting and settings observables

* [EC-859] add startsWith to reporting observable

* [EC-859] async pipe once in settings

* [EC-859] create get$ in org service

* [EC-859] transition remaining components

* [EC-859] add as org to template

* [EC-859] add shareReplay to observable to prevent multicasting
- future proof get$ on org service

* [AC-859] fix missed org
This commit is contained in:
Jake Fink
2023-02-27 16:31:55 -05:00
committed by GitHub
parent ff89d86d40
commit c160827272
9 changed files with 66 additions and 63 deletions

View File

@@ -32,7 +32,7 @@ export function canAccessReportingTab(org: Organization): boolean {
}
export function canAccessBillingTab(org: Organization): boolean {
return org.canManageBilling;
return org.isOwner;
}
export function canAccessOrgAdmin(org: Organization): boolean {
@@ -63,6 +63,7 @@ export function isNotProviderUser(org: Organization): boolean {
export abstract class OrganizationService {
organizations$: Observable<Organization[]>;
get$: (id: string) => Observable<Organization | undefined>;
get: (id: string) => Organization;
getByIdentifier: (identifier: string) => Organization;
getAll: (userId?: string) => Promise<Organization[]>;