mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-26 23:07:24 +00:00
perf: 优化 admin token 判断
This commit is contained in:
parent
5411f65546
commit
d3176b68a8
@ -341,7 +341,7 @@ class AdminConnectionToken(ConnectionToken):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_user_permed_account(cls, user, asset, account_name, protocol):
|
def get_user_permed_account(cls, user, asset, account_name, protocol):
|
||||||
account = asset.accounts.filter(name=cls.account).first()
|
account = asset.accounts.filter(name=account_name).first()
|
||||||
if not account:
|
if not account:
|
||||||
return None
|
return None
|
||||||
account.actions = ActionChoices.all()
|
account.actions = ActionChoices.all()
|
||||||
|
Loading…
Reference in New Issue
Block a user