Skip to content

Commit

Permalink
fix(git): PublicKeyHandler logic
Browse files Browse the repository at this point in the history
Fixes: 00195a6 ("Add DefaultConfig and make NewServer take a config")
  • Loading branch information
aymanbagabas committed Oct 12, 2021
1 parent 2148bae commit 3471671
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/config/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3471671

Please sign in to comment.