Make unlock work, even when disablepinrequirement is active

This commit is contained in:
Bernd Schoolmann 2023-08-21 19:54:11 +02:00
parent ac556d593e
commit 12dce1e9f8
No known key found for this signature in database
1 changed files with 0 additions and 4 deletions

View File

@ -69,10 +69,6 @@ func sync(ctx context.Context, vault *vault.Vault, cfg *config.Config) bool {
func ensureIsNotLocked(action Action) Action { func ensureIsNotLocked(action Action) Action {
return func(request ipc.IPCMessage, cfg *config.Config, vault *vault.Vault, ctx sockets.CallingContext) (interface{}, error) { return func(request ipc.IPCMessage, cfg *config.Config, vault *vault.Vault, ctx sockets.CallingContext) (interface{}, error) {
if cfg.ConfigFile.RuntimeConfig.DisablePinRequirement {
return action(request, cfg, vault, ctx)
}
if cfg.IsLocked() { if cfg.IsLocked() {
err := cfg.TryUnlock(vault) err := cfg.TryUnlock(vault)
ctx1 := context.Background() ctx1 := context.Background()