sftpgo: re-enable password login

This commit is contained in:
Colin 2024-04-18 04:58:59 +00:00
parent 62b3047fff
commit d80852c6c1
1 changed files with 6 additions and 7 deletions

View File

@ -124,13 +124,12 @@ def getAuthResponse(ip: str, username: str, password: str) -> dict:
return a sftpgo auth response either denying the user or approving them
with a set of permissions.
"""
# TODO: allow external access only after i enable FTPS/ssl
# if isTrustedCred(password) and username != "colin":
# # allow r/w access from those with a special token
# return mkAuthOk(username, permissions = {
# "/": PERM_RW,
# "/playground": PERM_RW,
# })
if isTrustedCred(password) and username != "colin":
# allow r/w access from those with a special token
return mkAuthOk(username, permissions = {
"/": PERM_RW,
"/playground": PERM_RW,
})
if isWireguard(ip):
# allow any user from wireguard
return mkAuthOk(username, permissions = {