mirror of https://github.com/jumpserver/jumpserver
modify sudo show
parent
bf80799fb6
commit
1952d1ca23
|
@ -380,7 +380,8 @@ def sudo_edit(request):
|
|||
|
||||
else:
|
||||
user_group_id = request.POST.get('user_group_id', '')
|
||||
users_runas = request.POST.get('runas', 'root')
|
||||
users_runas = request.POST.get('runas') if request.POST.get('runas') else 'root'
|
||||
print users_runas
|
||||
asset_groups_select = request.POST.getlist('asset_groups_select')
|
||||
cmd_groups_select = request.POST.getlist('cmd_groups_select')
|
||||
comment = request.POST.get('comment', '')
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<div class="col-sm-8">
|
||||
<textarea id='cmd' name='cmd' class="form-control" rows="10" placeholder="命令">{{ cmd }}</textarea>
|
||||
<span class="help-block m-b-none">
|
||||
输入命令一行一个
|
||||
输入命令一行一个,请写绝对路径如: /bin/su,所有是ALL,排除su是 !/bin/su
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<input id="runas" name="runas" placeholder="RunAsUser" type="text" class="form-control" value="{{ user_runas }}">
|
||||
<input id="user_group_id" name="user_group_id" type="text" value="{{ user_group.id }}" style="display: none">
|
||||
<span class="help-block m-b-none">
|
||||
允许以哪个用户允许sudo,逗号分隔,默认root
|
||||
允许以哪个用户进行sudo,逗号分隔,如: root或者 ALL 等
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue