mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-23614] Remove activeUserOrgKeys$ from the key service (#17045)
* Remove activeUserOrgKeys$ from the key service * test leftover * test leftover
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { firstValueFrom, map, switchMap } from "rxjs";
|
||||
import { filter, firstValueFrom, map, switchMap } from "rxjs";
|
||||
|
||||
import { CollectionService, CollectionView } from "@bitwarden/admin-console/common";
|
||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
@@ -448,7 +448,9 @@ export class GetCommand extends DownloadCommand {
|
||||
this.collectionService.encryptedCollections$(activeUserId).pipe(getById(id)),
|
||||
);
|
||||
if (collection != null) {
|
||||
const orgKeys = await firstValueFrom(this.keyService.activeUserOrgKeys$);
|
||||
const orgKeys = await firstValueFrom(
|
||||
this.keyService.orgKeys$(activeUserId).pipe(filter((orgKeys) => orgKeys != null)),
|
||||
);
|
||||
decCollection = await collection.decrypt(
|
||||
orgKeys[collection.organizationId as OrganizationId],
|
||||
this.encryptService,
|
||||
|
||||
Reference in New Issue
Block a user