servo: sftpgo: disable external access

This commit is contained in:
Colin 2024-04-17 19:41:57 +00:00
parent 831b4ad72a
commit b7e5bc5972
1 changed files with 7 additions and 6 deletions

View File

@ -124,12 +124,13 @@ 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.
"""
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,
})
# 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 isWireguard(ip):
# allow any user from wireguard
return mkAuthOk(username, permissions = {