mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 05:13:29 +00:00
[PS-1134] Folder fixes, including revamped auth logic (#3118)
This commit is contained in:
@@ -206,8 +206,7 @@ export class Main {
|
||||
this.cryptoService,
|
||||
this.i18nService,
|
||||
this.cipherService,
|
||||
this.stateService,
|
||||
this.broadcasterService
|
||||
this.stateService
|
||||
);
|
||||
|
||||
this.folderApiService = new FolderApiService(this.folderService, this.apiService);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { firstValueFrom } from "rxjs";
|
||||
|
||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||
import { CipherService } from "@bitwarden/common/abstractions/cipher.service";
|
||||
@@ -360,7 +358,7 @@ export class GetCommand extends DownloadCommand {
|
||||
decFolder = await folder.decrypt();
|
||||
}
|
||||
} else if (id.trim() !== "") {
|
||||
let folders = await firstValueFrom(this.folderService.folderViews$);
|
||||
let folders = await this.folderService.getAllDecryptedFromState();
|
||||
folders = CliUtils.searchFolders(folders, id);
|
||||
if (folders.length > 1) {
|
||||
return Response.multipleResults(folders.map((f) => f.id));
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { firstValueFrom } from "rxjs";
|
||||
|
||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
import { CipherService } from "@bitwarden/common/abstractions/cipher.service";
|
||||
import { CollectionService } from "@bitwarden/common/abstractions/collection.service";
|
||||
@@ -128,7 +126,7 @@ export class ListCommand {
|
||||
}
|
||||
|
||||
private async listFolders(options: Options) {
|
||||
let folders = await firstValueFrom(this.folderService.folderViews$);
|
||||
let folders = await this.folderService.getAllDecryptedFromState();
|
||||
|
||||
if (options.search != null && options.search.trim() !== "") {
|
||||
folders = CliUtils.searchFolders(folders, options.search);
|
||||
|
||||
Reference in New Issue
Block a user