1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-24 12:06:15 +01: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

@ -1 +1 @@
Subproject commit 773c51901fe77165c40cfb018bf5b99a740b5e4a
Subproject commit 2d612b07de588a52e0e5895c4a4593f670442bb9

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)