sftpgo: re-enable password login
This commit is contained in:
@@ -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
|
return a sftpgo auth response either denying the user or approving them
|
||||||
with a set of permissions.
|
with a set of permissions.
|
||||||
"""
|
"""
|
||||||
# TODO: allow external access only after i enable FTPS/ssl
|
if isTrustedCred(password) and username != "colin":
|
||||||
# if isTrustedCred(password) and username != "colin":
|
# allow r/w access from those with a special token
|
||||||
# # allow r/w access from those with a special token
|
return mkAuthOk(username, permissions = {
|
||||||
# return mkAuthOk(username, permissions = {
|
"/": PERM_RW,
|
||||||
# "/": PERM_RW,
|
"/playground": PERM_RW,
|
||||||
# "/playground": PERM_RW,
|
})
|
||||||
# })
|
|
||||||
if isWireguard(ip):
|
if isWireguard(ip):
|
||||||
# allow any user from wireguard
|
# allow any user from wireguard
|
||||||
return mkAuthOk(username, permissions = {
|
return mkAuthOk(username, permissions = {
|
||||||
|
Reference in New Issue
Block a user