1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 07:13:32 +00:00

make sure org key exists for collection add/edit

This commit is contained in:
Kyle Spearrin
2018-09-10 08:25:52 -04:00
parent 26aa79db1a
commit 7c5ee1bd00
2 changed files with 5 additions and 1 deletions

2
jslib

Submodule jslib updated: 773c51901f...2d612b07de

View File

@@ -103,6 +103,10 @@ export class CollectionAddEditComponent implements OnInit {
}
async submit() {
if (this.orgKey == null) {
throw new Error('No encryption key for this organization.');
}
const request = new CollectionRequest();
request.name = (await this.cryptoService.encrypt(this.name, this.orgKey)).encryptedString;
request.groups = this.groups.filter((g) => (g as any).checked && !g.accessAll)