mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-28 17:27:50 +01:00
Don't save passwords if user is logged out
This commit is contained in:
parent
cc9ff07aae
commit
7b3f8d4223
@ -256,7 +256,7 @@ export default class MainBackground {
|
|||||||
this.commandsBackground = new CommandsBackground(this, this.passwordGenerationService,
|
this.commandsBackground = new CommandsBackground(this, this.passwordGenerationService,
|
||||||
this.platformUtilsService, this.vaultTimeoutService);
|
this.platformUtilsService, this.vaultTimeoutService);
|
||||||
this.notificationBackground = new NotificationBackground(this, this.autofillService, this.cipherService,
|
this.notificationBackground = new NotificationBackground(this, this.autofillService, this.cipherService,
|
||||||
this.storageService, this.vaultTimeoutService, this.policyService, this.folderService);
|
this.storageService, this.vaultTimeoutService, this.policyService, this.folderService, this.userService);
|
||||||
|
|
||||||
this.tabsBackground = new TabsBackground(this, this.notificationBackground);
|
this.tabsBackground = new TabsBackground(this, this.notificationBackground);
|
||||||
this.contextMenusBackground = new ContextMenusBackground(this, this.cipherService, this.passwordGenerationService,
|
this.contextMenusBackground = new ContextMenusBackground(this, this.cipherService, this.passwordGenerationService,
|
||||||
|
@ -8,8 +8,11 @@ import { CipherService } from 'jslib-common/abstractions/cipher.service';
|
|||||||
import { FolderService } from 'jslib-common/abstractions/folder.service';
|
import { FolderService } from 'jslib-common/abstractions/folder.service';
|
||||||
import { PolicyService } from 'jslib-common/abstractions/policy.service';
|
import { PolicyService } from 'jslib-common/abstractions/policy.service';
|
||||||
import { StorageService } from 'jslib-common/abstractions/storage.service';
|
import { StorageService } from 'jslib-common/abstractions/storage.service';
|
||||||
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
import { VaultTimeoutService } from 'jslib-common/abstractions/vaultTimeout.service';
|
import { VaultTimeoutService } from 'jslib-common/abstractions/vaultTimeout.service';
|
||||||
|
|
||||||
import { ConstantsService } from 'jslib-common/services/constants.service';
|
import { ConstantsService } from 'jslib-common/services/constants.service';
|
||||||
|
|
||||||
import { AutofillService } from '../services/abstractions/autofill.service';
|
import { AutofillService } from '../services/abstractions/autofill.service';
|
||||||
|
|
||||||
import { BrowserApi } from '../browser/browserApi';
|
import { BrowserApi } from '../browser/browserApi';
|
||||||
@ -34,7 +37,7 @@ export default class NotificationBackground {
|
|||||||
constructor(private main: MainBackground, private autofillService: AutofillService,
|
constructor(private main: MainBackground, private autofillService: AutofillService,
|
||||||
private cipherService: CipherService, private storageService: StorageService,
|
private cipherService: CipherService, private storageService: StorageService,
|
||||||
private vaultTimeoutService: VaultTimeoutService, private policyService: PolicyService,
|
private vaultTimeoutService: VaultTimeoutService, private policyService: PolicyService,
|
||||||
private folderService: FolderService) {
|
private folderService: FolderService, private userService: UserService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
@ -191,7 +194,7 @@ export default class NotificationBackground {
|
|||||||
normalizedUsername = normalizedUsername.toLowerCase();
|
normalizedUsername = normalizedUsername.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await this.vaultTimeoutService.isLocked()) {
|
if (await this.userService.isAuthenticated() && await this.vaultTimeoutService.isLocked()) {
|
||||||
if (!await this.allowPersonalOwnership()) {
|
if (!await this.allowPersonalOwnership()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user