From 3fa63ee2c2ff557fa4f127cf44421878d59e3c44 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 28 Aug 2018 23:17:44 -0400 Subject: [PATCH] user canAccessPremium checks --- jslib | 2 +- src/commands/get.command.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jslib b/jslib index 3c43265878..81c21418ec 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 3c43265878892adab985f6fc9b1b4270ae27aaa2 +Subproject commit 81c21418ec965221b4d322008f9da0ab7b9037d0 diff --git a/src/commands/get.command.ts b/src/commands/get.command.ts index 4058fc896c..910c12bbbd 100644 --- a/src/commands/get.command.ts +++ b/src/commands/get.command.ts @@ -182,11 +182,12 @@ export class GetCommand { return Response.error('Couldn\'t generate TOTP code.'); } - if (!this.tokenService.getPremium()) { + const canAccessPremium = await this.userService.canAccessPremium(); + if (!canAccessPremium) { const originalCipher = await this.cipherService.get(id); if (originalCipher == null || originalCipher.organizationId == null || !originalCipher.organizationUseTotp) { - return Response.error('A premium membership is required to use this feature.'); + return Response.error('Premium status is required to use this feature.'); } }