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:
@@ -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[]>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user