mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-29 14:51:33 +03:00
not allowlisted -> not allowed
This commit is contained in:
parent
bd91a245a0
commit
4fe4ff0154
6
auth.go
6
auth.go
@ -20,9 +20,9 @@ import (
|
|||||||
// It must return a nil slice on error.
|
// It must return a nil slice on error.
|
||||||
type KeyLoader func() ([]ssh.PublicKey, error)
|
type KeyLoader func() ([]ssh.PublicKey, error)
|
||||||
|
|
||||||
// ErrNotAllowlisted Is the error returned when a key is checked that is not allowlisted,
|
// ErrNotAllowed Is the error returned when a key is checked that is not allowlisted,
|
||||||
// when allowlisting is enabled.
|
// when allowlisting is enabled.
|
||||||
var ErrNotAllowlisted = errors.New("not allowlisted")
|
var ErrNotAllowed = errors.New("not allowed")
|
||||||
|
|
||||||
// ErrBanned is the error returned when a client is banned.
|
// ErrBanned is the error returned when a client is banned.
|
||||||
var ErrBanned = errors.New("banned")
|
var ErrBanned = errors.New("banned")
|
||||||
@ -141,7 +141,7 @@ func (a *Auth) CheckPublicKey(key ssh.PublicKey) error {
|
|||||||
if a.AllowAnonymous() || allowlisted || a.IsOp(key) {
|
if a.AllowAnonymous() || allowlisted || a.IsOp(key) {
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
return ErrNotAllowlisted
|
return ErrNotAllowed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user