diff --git a/juser/urls.py b/juser/urls.py index 9764c01ce..bfd3a6270 100644 --- a/juser/urls.py +++ b/juser/urls.py @@ -28,4 +28,6 @@ urlpatterns = patterns('juser.views', (r'^change_role/$', 'chg_role'), (r'^regen_ssh_key/$', 'regen_ssh_key'), (r'^down_key/$', 'down_key'), + + (r'runcommand/$', 'RunCommand'), ) diff --git a/juser/views.py b/juser/views.py index 84f39954b..59f542729 100644 --- a/juser/views.py +++ b/juser/views.py @@ -487,4 +487,9 @@ def down_key(request): response['Content-Disposition'] = 'attachment; filename=%s' % os.path.basename(private_key_file) return response - return HttpResponse('No Key File. Contact Admin.') \ No newline at end of file + return HttpResponse('No Key File. Contact Admin.') +from jperm.perm_api import get_group_user_perm +def RunCommand(request): + if request.method == 'GET': + print + return render_to_response('juser/run_command.html', locals(), context_instance=RequestContext(request)) \ No newline at end of file diff --git a/templates/nav.html b/templates/nav.html index c5d46fb54..d45ea0ea6 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -128,6 +128,9 @@