Commit 3484b3ec authored by ibuler's avatar ibuler

[Update] sftp不显示无法自动登录的

parent 4fda262a
...@@ -92,7 +92,10 @@ class SFTPServer(paramiko.SFTPServerInterface): ...@@ -92,7 +92,10 @@ class SFTPServer(paramiko.SFTPServerInterface):
asset = self.hosts.get(host) asset = self.hosts.get(host)
if not asset: if not asset:
return [] return []
return [su for su in asset.system_users_granted if su.protocol == "ssh"] return [
su for su in asset.system_users_granted
if su.protocol == "ssh" and su.login_mode != 'auto'
]
def su_in_asset(self, su, host): def su_in_asset(self, su, host):
system_users = self.get_asset_system_users(host) system_users = self.get_asset_system_users(host)
......
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