mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-13 13:59:17 +00:00
perf: 修改 CommandFilterACL, CommandGroup Model 的 Meta 内部类; 修改 Command Model 的 system_user -> account 字段; 修改 ConnectionToken 的 command_filter_acls 返回字段;
This commit is contained in:
@@ -160,15 +160,15 @@ class ConnectionToken(OrgModelMixin, JMSBaseModel):
|
||||
return self.domain.random_gateway()
|
||||
|
||||
@lazyproperty
|
||||
def acl_command_groups(self):
|
||||
def command_filter_acls(self):
|
||||
from acls.models import CommandFilterACL
|
||||
kwargs = {
|
||||
'user': self.user,
|
||||
'asset': self.asset,
|
||||
'account': self.account,
|
||||
}
|
||||
command_groups = CommandFilterACL.filter_queryset(**kwargs).get_command_groups()
|
||||
return command_groups
|
||||
acls = CommandFilterACL.filter_queryset(**kwargs).valid()
|
||||
return acls
|
||||
|
||||
|
||||
class SuperConnectionToken(ConnectionToken):
|
||||
|
Reference in New Issue
Block a user