Do not prompt for new login if user is not logged in

This commit is contained in:
Daniel James Smith 2021-11-16 13:34:06 +01:00
parent 7b3f8d4223
commit daf20bbf57
No known key found for this signature in database
GPG Key ID: 03E4BD365FF06726
1 changed files with 5 additions and 1 deletions

View File

@ -184,6 +184,10 @@ export default class NotificationBackground {
} }
private async addLogin(loginInfo: AddLoginRuntimeMessage, tab: chrome.tabs.Tab) { private async addLogin(loginInfo: AddLoginRuntimeMessage, tab: chrome.tabs.Tab) {
if (!await this.userService.isAuthenticated()) {
return;
}
const loginDomain = Utils.getDomain(loginInfo.url); const loginDomain = Utils.getDomain(loginInfo.url);
if (loginDomain == null) { if (loginDomain == null) {
return; return;
@ -194,7 +198,7 @@ export default class NotificationBackground {
normalizedUsername = normalizedUsername.toLowerCase(); normalizedUsername = normalizedUsername.toLowerCase();
} }
if (await this.userService.isAuthenticated() && await this.vaultTimeoutService.isLocked()) { if (await this.vaultTimeoutService.isLocked()) {
if (!await this.allowPersonalOwnership()) { if (!await this.allowPersonalOwnership()) {
return; return;
} }