Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5367 closed defect (fixed)

Update edit view for database changes

Reported by: ayleph Owned by:
Priority: blocker Milestone: 0.9.0
Component: programming Keywords: edit, db, migrations
Cc: tsyesika Parent Tickets:

Description

Editing other users' media causes a server error.

Subtickets

Change History (4)

comment:1 Changed 5 years ago by ayleph

Owner: ayleph deleted
Status: newreview

This patch fixes this issue.

From 41f88aa83b385e948e508a98e8aa348c23486161 Mon Sep 17 00:00:00 2001
From: ayleph <ayleph@thisshitistemp.comm>
Date: Sun, 6 Dec 2015 14:54:32 -0500
Subject: [PATCH] Fix issue 5367 Edit view updates

This commit fixes issue 5367 by updating the edit view to be compatible
with recent db migrations.
---
 mediagoblin/edit/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py
index 8e80b3c..3982820 100644
--- a/mediagoblin/edit/views.py
+++ b/mediagoblin/edit/views.py
@@ -91,7 +91,7 @@ def edit_media(request, media):
             return redirect_obj(request, media)
 
     if request.user.has_privilege(u'admin') \
-            and media.uploader != request.user.id \
+            and media.actor != request.user.id \
             and request.method != 'POST':
         messages.add_message(
             request, messages.WARNING,
-- 
2.6.2

comment:2 Changed 5 years ago by Jessica Tallon

will review tomorrow

comment:3 Changed 5 years ago by Jessica Tallon

Resolution: fixed
Status: reviewclosed

This has been reviewed and pushed to master, sorry i took longer than i expected, christmas and new years has been hectic. The commit is e75a45c.

Last edited 5 years ago by Jessica Tallon (previous) (diff)

comment:4 Changed 5 years ago by Christopher Allan Webber

Milestone: 0.8.20.9.0

All 0.8.2 tickets are being rolled over to 0.9.0

Note: See TracTickets for help on using tickets.