mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
view grouping of ciphers for a collection
This commit is contained in:
@@ -178,12 +178,14 @@ export default class CipherService {
|
||||
return this.decryptedCipherCache;
|
||||
}
|
||||
|
||||
async getAllDecryptedForFolder(folderId: string): Promise<any[]> {
|
||||
async getAllDecryptedForGrouping(groupingId: string, folder: boolean = true): Promise<any[]> {
|
||||
const ciphers = await this.getAllDecrypted();
|
||||
const ciphersToReturn: any[] = [];
|
||||
|
||||
ciphers.forEach((cipher) => {
|
||||
if (cipher.folderId === folderId) {
|
||||
if (folder && cipher.folderId === groupingId) {
|
||||
ciphersToReturn.push(cipher);
|
||||
} else if (!folder && cipher.collectionIds != null && cipher.collectionIds.indexOf(groupingId) > -1) {
|
||||
ciphersToReturn.push(cipher);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user