[Oi-commits] r1111 - trunk/forum

oi-commits at pardus.org.tr oi-commits at pardus.org.tr
Wed Mar 5 18:09:17 EET 2008


Author: jnmbk
Date: Wed Mar  5 18:09:17 2008
New Revision: 1111

Modified:
   trunk/forum/views.py
Log:
it's not wrong way when user is the author of first post

Modified: trunk/forum/views.py
=================================================================
--- trunk/forum/views.py	(original)
+++ trunk/forum/views.py	Wed Mar  5 18:09:17 2008
@@ -179,7 +179,7 @@
     topic = get_object_or_404(Topic, pk=topic_id)
     first_post = topic.post_set.order_by('created')[0]
 
-    if not request.user.has_perm('forum.change_topic'):
+    if not request.user.has_perm('forum.change_topic') and not first_post.author == request.user:
         return HttpResponse('Opps, wrong way :)')
 
     if forum.locked or topic.locked:


More information about the Oi-commits mailing list