mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-19 18:34:28 +00:00
[Bugfix] 修复动态系统用户执行批量命令的bug
This commit is contained in:
@@ -33,7 +33,12 @@ class CommandExecution(OrgModelMixin):
|
||||
|
||||
@property
|
||||
def inventory(self):
|
||||
return JMSInventory(self.hosts.all(), run_as=self.run_as.username)
|
||||
if self.run_as.username_same_with_user:
|
||||
username = self.user.username
|
||||
else:
|
||||
username = self.run_as.username
|
||||
inv = JMSInventory(self.hosts.all(), run_as=username)
|
||||
return inv
|
||||
|
||||
@property
|
||||
def result(self):
|
||||
|
Reference in New Issue
Block a user