mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-06 18:00:57 +00:00
perf: remove gather model (#9246)
Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
@@ -11,6 +11,7 @@ from rest_framework.exceptions import PermissionDenied, NotFound
|
||||
|
||||
from assets.utils import KubernetesTree
|
||||
from assets.models import Asset, Account
|
||||
from assets.const import AliasAccount
|
||||
from assets.api import SerializeToTreeNodeMixin
|
||||
from authentication.models import ConnectionToken
|
||||
from common.utils import get_object_or_none, lazyproperty
|
||||
@@ -157,7 +158,7 @@ class UserGrantedK8sAsTreeApi(SelfOrPKUserMixin, ListAPIView):
|
||||
raise NotFound('Account is not found')
|
||||
account = accounts[0]
|
||||
if account.username in [
|
||||
Account.AliasAccount.INPUT, Account.AliasAccount.USER
|
||||
AliasAccount.INPUT, AliasAccount.USER
|
||||
]:
|
||||
return token.input_secret
|
||||
else:
|
||||
|
Reference in New Issue
Block a user