1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

protected loadCollections for add/edit

This commit is contained in:
Kyle Spearrin 2018-10-22 14:47:49 -04:00
parent c946f01b5f
commit 3021afc9dd

View File

@ -136,8 +136,7 @@ export class AddEditComponent implements OnInit {
this.ownershipOptions.push({ name: o.name, value: o.id });
}
});
const allCollections = await this.collectionService.getAllDecrypted();
this.writeableCollections = allCollections.filter((c) => !c.readOnly);
this.writeableCollections = await this.loadCollections();
}
async load() {
@ -350,6 +349,11 @@ export class AddEditComponent implements OnInit {
}
}
protected async loadCollections() {
const allCollections = await this.collectionService.getAllDecrypted();
return allCollections.filter((c) => !c.readOnly);
}
protected loadCipher() {
return this.cipherService.get(this.cipherId);
}