mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-30 22:41:33 +01:00
[PM-16918] Fix agent setting not disabling key usage (#12857)
* Fix agent setting not disabling key usage * Cleanup * Change firstvaluefrom to withlatestfrom * Switch back to concatmap
This commit is contained in:
parent
b083a05d9f
commit
8717d79d51
@ -83,6 +83,15 @@ export class SshAgentService implements OnDestroy {
|
||||
this.messageListener
|
||||
.messages$(new CommandDefinition("sshagent.signrequest"))
|
||||
.pipe(
|
||||
withLatestFrom(this.desktopSettingsService.sshAgentEnabled$),
|
||||
concatMap(async ([message, enabled]) => {
|
||||
if (!enabled) {
|
||||
await ipc.platform.sshAgent.signRequestResponse(message.requestId as number, false);
|
||||
}
|
||||
return { message, enabled };
|
||||
}),
|
||||
filter(({ enabled }) => enabled),
|
||||
map(({ message }) => message),
|
||||
withLatestFrom(this.authService.activeAccountStatus$),
|
||||
// This switchMap handles unlocking the vault if it is locked:
|
||||
// - If the vault is locked, we will wait for it to be unlocked.
|
||||
|
Loading…
Reference in New Issue
Block a user