mirror of https://github.com/jumpserver/jumpserver
perf: 修改 CommandFilterACL, CommandGroup __str__
parent
519e0eac01
commit
0cfcfacb6d
|
@ -91,7 +91,7 @@ class CommandGroup(JMSOrgBaseModel):
|
|||
return True, '', pattern
|
||||
|
||||
def __str__(self):
|
||||
return '{} % {}'.format(self.type, self.content)
|
||||
return '{} % {}'.format(self.name, self.type)
|
||||
|
||||
|
||||
class CommandFilterACLQuerySet(UserAssetAccountACLQuerySet):
|
||||
|
@ -113,6 +113,9 @@ class CommandFilterACL(UserAssetAccountBaseACL):
|
|||
ordering = ('priority', '-date_updated', 'name')
|
||||
verbose_name = _('Command acl')
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def create_command_confirm_ticket(self, run_command, session, cmd_filter_rule, org_id):
|
||||
from tickets.const import TicketType
|
||||
from tickets.models import ApplyCommandTicket
|
||||
|
|
Loading…
Reference in New Issue