no key safety check for orgs

This commit is contained in:
Kyle Spearrin 2018-09-10 08:22:10 -04:00
parent 773c51901f
commit 2d612b07de
1 changed files with 3 additions and 0 deletions

View File

@ -134,6 +134,9 @@ export class CipherService implements CipherServiceAbstraction {
if (key == null && cipher.organizationId != null) {
key = await this.cryptoService.getOrgKey(cipher.organizationId);
if (key == null) {
throw new Error('Cannot encrypt cipher for organization. No key.');
}
}
await Promise.all([
this.encryptObjProperty(model, cipher, {