mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-09 06:54:49 +00:00
* [Update] 任务区分org * [Update] 修改翻译 * [Update] 使用id而不是hostname * [Update] 执行命令 * [Update] 修改一些东西 * [Update] 暂存 * [Update] 用户执行命令 * [Update] 添加资产授权模块-tree * [Update] 暂时这样 * [Update] 批量命令执行 * [Update] 修改表结构 * [Update] 更新翻译 * [Update] 删除cloud模块无效中文翻译
18 lines
451 B
Python
18 lines
451 B
Python
# -*- coding: utf-8 -*-
|
|
#
|
|
from django import forms
|
|
|
|
from assets.models import SystemUser
|
|
from .models import CommandExecution
|
|
|
|
|
|
class CommandExecutionForm(forms.ModelForm):
|
|
class Meta:
|
|
model = CommandExecution
|
|
fields = ['run_as', 'command']
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
run_as_field = self.fields.get('run_as')
|
|
run_as_field.queryset = SystemUser.objects.all()
|