s
This commit is contained in:
@@ -29,9 +29,6 @@ import (
|
||||
// (false, ErrDenied) on an unknown key, unknown repo, or insufficient grant.
|
||||
// skip-auth allows all.
|
||||
func (s *LocalState) AccessBySSHKey(ctx context.Context, key ssh.PublicKey, owner, name string, perm common.Perm) (bool, error) {
|
||||
if s.skipAuth {
|
||||
return true, nil
|
||||
}
|
||||
r, err := s.findRepo(owner, name)
|
||||
if err != nil {
|
||||
if errors.Is(err, ErrRepoNotFound) {
|
||||
@@ -84,9 +81,6 @@ func (s *LocalState) AccessBySSHKey(ctx context.Context, key ssh.PublicKey, owne
|
||||
//
|
||||
// skip-auth admits everything (no engine).
|
||||
func (s *LocalState) KnownSSHKey(key ssh.PublicKey) (bool, error) {
|
||||
if s.skipAuth {
|
||||
return true, nil
|
||||
}
|
||||
var sk SSHKey
|
||||
has, err := s.engine.Where("fingerprint = ?", fingerprint(key)).Get(&sk)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user