diff --git a/jperm/views.py b/jperm/views.py index 57559444e..36d188f6e 100644 --- a/jperm/views.py +++ b/jperm/views.py @@ -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', '') diff --git a/templates/jperm/sudo_cmd_add.html b/templates/jperm/sudo_cmd_add.html index 9f9e8990e..f2135f31d 100644 --- a/templates/jperm/sudo_cmd_add.html +++ b/templates/jperm/sudo_cmd_add.html @@ -80,7 +80,7 @@
- 输入命令一行一个 + 输入命令一行一个,请写绝对路径如: /bin/su,所有是ALL,排除su是 !/bin/su
diff --git a/templates/jperm/sudo_edit.html b/templates/jperm/sudo_edit.html index 69b957739..e1c7977ce 100644 --- a/templates/jperm/sudo_edit.html +++ b/templates/jperm/sudo_edit.html @@ -55,7 +55,7 @@ - 允许以哪个用户允许sudo,逗号分隔,默认root + 允许以哪个用户进行sudo,逗号分隔,如: root或者 ALL 等