modify sudo show

pull/7/merge
ibuler 2015-05-25 18:27:57 +08:00
parent bf80799fb6
commit 1952d1ca23
3 changed files with 4 additions and 3 deletions

View File

@ -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', '')

View File

@ -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>

View File

@ -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>