1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

Update Organization and Policy Services to allow the passing of a user id and to prevent hangs waiting on an active user (#8712)

* OrgSvc - add new observable returning getAll$ method which accepts a required user id

* OrgSvc - make user id optional

* PolicySvc - getAll$ should use the new OrgSvc.getAll$ method so that it doesn't hang if there isn't an active user yet but a user id was passed in.

* Fix policy service tests
This commit is contained in:
Jared Snider
2024-04-12 10:21:19 -04:00
committed by GitHub
parent b914260705
commit 5f97f4c4a8
4 changed files with 16 additions and 3 deletions

View File

@@ -121,7 +121,11 @@ export abstract class OrganizationService {
get$: (id: string) => Observable<Organization | undefined>;
get: (id: string) => Promise<Organization>;
getAll: (userId?: string) => Promise<Organization[]>;
//
/**
* Publishes state for all organizations for the given user id or the active user.
*/
getAll$: (userId?: UserId) => Observable<Organization[]>;
}
/**