Commit ad2a6587 authored by Eric's avatar Eric

[Update] auth code

parent 643df6d2
......@@ -20,7 +20,7 @@ import (
func SftpHandler(sess ssh.Session) {
currentUser, ok := sess.Context().Value(model.ContextKeyUser).(*model.User)
if !ok {
if !ok || currentUser.ID == "" {
logger.Errorf("SFTP User not found, exit.")
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment