user canAccessPremium checks
This commit is contained in:
parent
f704b62db5
commit
3fa63ee2c2
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit 3c43265878892adab985f6fc9b1b4270ae27aaa2
|
Subproject commit 81c21418ec965221b4d322008f9da0ab7b9037d0
|
|
@ -182,11 +182,12 @@ export class GetCommand {
|
||||||
return Response.error('Couldn\'t generate TOTP code.');
|
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);
|
const originalCipher = await this.cipherService.get(id);
|
||||||
if (originalCipher == null || originalCipher.organizationId == null ||
|
if (originalCipher == null || originalCipher.organizationId == null ||
|
||||||
!originalCipher.organizationUseTotp) {
|
!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.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue