mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-01-29 21:51:31 +00:00
perf: 优化公钥设置,并删掉一部分不用的 html
This commit is contained in:
@@ -66,13 +66,9 @@ class AuthMixin:
|
||||
def can_update_ssh_key(self):
|
||||
return self.can_use_ssh_key_login()
|
||||
|
||||
def can_use_ssh_key_login(self):
|
||||
if not settings.TERMINAL_PUBLIC_KEY_AUTH:
|
||||
return False
|
||||
if self.is_local or settings.TERMINAL_ONLY_SOURCE_LOCAL_CAN_PUBLIC_KEY_AUTH:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
@staticmethod
|
||||
def can_use_ssh_key_login():
|
||||
return settings.TERMINAL_PUBLIC_KEY_AUTH
|
||||
|
||||
def is_public_key_valid(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user