aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-07-03 09:26:40 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-07-03 09:26:40 -0500
commit96a2c366427f288ba3c2e20789612d829a55e908 (patch)
tree57a36df34e4efb0d35b266c92e4a7b78cb1c831f
parent7a44bb16db549797e721433c240dfaa89020156d (diff)
downloadmediagoblin-96a2c366427f288ba3c2e20789612d829a55e908.tar.lz
mediagoblin-96a2c366427f288ba3c2e20789612d829a55e908.tar.xz
mediagoblin-96a2c366427f288ba3c2e20789612d829a55e908.zip
Caution an admin when they're editing someone else's media.
-rw-r--r--mediagoblin/edit/views.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py
index 64fa0eab..f069d8e7 100644
--- a/mediagoblin/edit/views.py
+++ b/mediagoblin/edit/views.py
@@ -64,6 +64,14 @@ def edit_media(request, media):
return redirect(request, "mediagoblin.user_pages.media_home",
user=media.uploader()['username'], media=media['slug'])
+ if request.user['is_admin'] \
+ and media['uploader'] != request.user['_id'] \
+ and request.method != 'POST':
+ messages.add_message(
+ request, messages.WARNING,
+ 'You are editing another user\'s media. Proceed with caution.')
+
+
return render_to_response(
request,
'mediagoblin/edit/edit.html',