diff --git a/webroot/AutoSa/AutoSa/views.py b/webroot/AutoSa/AutoSa/views.py index ba25fcf56..8e7240de5 100644 --- a/webroot/AutoSa/AutoSa/views.py +++ b/webroot/AutoSa/AutoSa/views.py @@ -619,11 +619,15 @@ def showSudo(request): 'user_menu': 'active'}, context_instance=RequestContext(request)) - @admin_required def chgSudo(request): - pass - + if request.method == 'GET': + username = request.GET.get('username') + if not username: + return HttpResponseRedirect('/showUser/') + return render_to_response('chgSudo.html') + else: + return HttpResponseRedirect('/') @admin_required diff --git a/webroot/AutoSa/templates/chgSudo.html b/webroot/AutoSa/templates/chgSudo.html new file mode 100644 index 000000000..752a97e78 --- /dev/null +++ b/webroot/AutoSa/templates/chgSudo.html @@ -0,0 +1,57 @@ +{% extends 'base.html' %} +{% block content %} +
+ {{ username }} +
+
+
+
+ + + + +
+
+
+
+ +
+
+
+
+ + + + +
+
+
+
+ +
+
+
+
+ + + + +
+
+
+
+ +
+
+
+
+ + + + +
+
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/webroot/AutoSa/templates/showSudo.html b/webroot/AutoSa/templates/showSudo.html index 41795f5e5..48c649a30 100644 --- a/webroot/AutoSa/templates/showSudo.html +++ b/webroot/AutoSa/templates/showSudo.html @@ -2,20 +2,18 @@ {% block content %}
{{ username }} - 允许sudo的主机: + 允许sudo的主机:
- 允许的sudo命令: - + 允许sudo的主机: -
{% endblock %} \ No newline at end of file