aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-07-04 08:47:02 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-07-04 08:47:02 -0500
commit9973c0580fa1b9ce3a75b37d06c645b3f9829fb8 (patch)
treef204d49d13cdd460712f4029490738d344f0159c
parent0aa58285c39d7f00f460ac391d4e724dcb42c1f3 (diff)
downloadmediagoblin-9973c0580fa1b9ce3a75b37d06c645b3f9829fb8.tar.lz
mediagoblin-9973c0580fa1b9ce3a75b37d06c645b3f9829fb8.tar.xz
mediagoblin-9973c0580fa1b9ce3a75b37d06c645b3f9829fb8.zip
Check user['_id'] instead of username, which is slightly more guaranteed
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/user.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html
index 96b6b9d1..ba61e52f 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/user.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/user.html
@@ -27,9 +27,9 @@
{% block mediagoblin_content -%}
{% if user %}
<h1>{{ user.username }}'s profile</h1>
- {% if request.user.username == user.username or request.user['is_admin'] %}
+ {% if request.user['_id'] == user['_id'] or request.user['is_admin'] %}
<a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
- user.username }}"> Edit</a>
+ user.username }}">Edit profile</a>
{% endif %}
{% include "mediagoblin/utils/profile.html" %}