Superuser profile view fixes

This commit is contained in:
nikolark committed 2012-01-30 20:17:07 +01:00
1 parent 38fe3c91b6
commit 870594e30d
2 files changed
+4 -3

No files matched your search

+3 -2
View File
@@ -35,13 +35,14 @@ def index(request):
@login_required
def profile(request):
username = request.user
ldap_user = None
try:
ldap_user = LdapUser.objects.get(username=request.user)
ldap_user = LdapUser.objects.get(username=username)
except:
return render_to_response('private/profile.html', locals(), context_instance=RequestContext(request))
groups = LdapGroup.objects.filter(usernames__contains=request.user)
groups = LdapGroup.objects.filter(usernames__contains=username)
private_group = LdapGroup.objects.filter(gid=ldap_user.group)[0]
return render_to_response('private/profile.html', locals(), context_instance=RequestContext(request))
+1 -1
View File
@@ -11,7 +11,7 @@
{% block content %}
<script>
$(function() {
var username = "{{request.user}}";
var username = "{{username}}";
/* Display the service status of the user */
var img_check = ' <img src="/static/check.png" alt="OK" />';
var img_error = ' <img src="/static/exclamation_mark.png" alt="ERROR" />';