mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
user canAccessPremium checks
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 3c43265878...81c21418ec
@@ -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.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user