mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-24 14:02:01 +00:00
Merge pull request #10685 from jumpserver/pr@dev@fix_command_filter_acls_error
perf: 优化命令过滤 acl 获取
This commit is contained in:
commit
c85df4cf42
@ -16,6 +16,7 @@ from common.exceptions import JMSException
|
|||||||
from common.utils import lazyproperty, pretty_string, bulk_get
|
from common.utils import lazyproperty, pretty_string, bulk_get
|
||||||
from common.utils.timezone import as_current_tz
|
from common.utils.timezone import as_current_tz
|
||||||
from orgs.mixins.models import JMSOrgBaseModel
|
from orgs.mixins.models import JMSOrgBaseModel
|
||||||
|
from orgs.utils import tmp_to_org
|
||||||
from terminal.models import Applet
|
from terminal.models import Applet
|
||||||
|
|
||||||
|
|
||||||
@ -255,7 +256,8 @@ class ConnectionToken(JMSOrgBaseModel):
|
|||||||
'asset': self.asset,
|
'asset': self.asset,
|
||||||
'account': self.account_object,
|
'account': self.account_object,
|
||||||
}
|
}
|
||||||
acls = CommandFilterACL.filter_queryset(**kwargs).valid()
|
with tmp_to_org(self.asset.org_id):
|
||||||
|
acls = CommandFilterACL.filter_queryset(**kwargs).valid()
|
||||||
return acls
|
return acls
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user