From 34716717690b08f68d90cc7017f27d82a3c8acb4 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Tue, 12 Oct 2021 15:13:32 -0400 Subject: [PATCH] fix(git): PublicKeyHandler logic Fixes: 00195a6764e1 ("Add DefaultConfig and make NewServer take a config") --- internal/config/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config/git.go b/internal/config/git.go index 35a9757da4c1f3ad3306f67070455d5dbd7a5ced..40ded971a90e5920b14e522dafc0fcf80931d4ae 100644 --- a/internal/config/git.go +++ b/internal/config/git.go @@ -35,7 +35,7 @@ func (cfg *Config) PasswordHandler(ctx ssh.Context, password string) bool { } func (cfg *Config) PublicKeyHandler(ctx ssh.Context, pk ssh.PublicKey) bool { - return cfg.accessForKey("", pk) == gm.NoAccess + return cfg.accessForKey("", pk) != gm.NoAccess } func (cfg *Config) accessForKey(repo string, pk ssh.PublicKey) gm.AccessLevel {