mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-28 12:45:45 +01:00
Check for premium access for totp copying option (#1252)
* Check for premium access for totp copying option * restore old null check logic
This commit is contained in:
parent
f996f1b243
commit
d3ab19becb
@ -445,13 +445,15 @@ export default class MainBackground {
|
|||||||
title: this.i18nService.t('copyPassword'),
|
title: this.i18nService.t('copyPassword'),
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.contextMenusCreate({
|
if (await this.userService.canAccessPremium()) {
|
||||||
type: 'normal',
|
await this.contextMenusCreate({
|
||||||
id: 'copy-totp',
|
type: 'normal',
|
||||||
parentId: 'root',
|
id: 'copy-totp',
|
||||||
contexts: ['all'],
|
parentId: 'root',
|
||||||
title: this.i18nService.t('copyVerificationCode'),
|
contexts: ['all'],
|
||||||
});
|
title: this.i18nService.t('copyVerificationCode'),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
await this.contextMenusCreate({
|
await this.contextMenusCreate({
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
@ -587,7 +589,8 @@ export default class MainBackground {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cipher == null || (cipher.login.totp && cipher.login.totp !== '')) {
|
const canAccessPremium = await this.userService.canAccessPremium();
|
||||||
|
if (canAccessPremium && (cipher == null || (cipher.login.totp && cipher.login.totp !== ''))) {
|
||||||
await this.contextMenusCreate({
|
await this.contextMenusCreate({
|
||||||
type: 'normal',
|
type: 'normal',
|
||||||
id: 'copy-totp_' + idSuffix,
|
id: 'copy-totp_' + idSuffix,
|
||||||
|
Loading…
Reference in New Issue
Block a user