]> git.sommitrealweird.co.uk Git - sommitrealweird.git/commitdiff
Allow logged in users to comment on blog entries by passing moderation
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Tue, 12 Jun 2012 15:26:54 +0000 (16:26 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Tue, 12 Jun 2012 15:26:54 +0000 (16:26 +0100)
sommitrealweird/blog/models.py

index c98407ded0d508709e9b7c58b1716ea072e4e706..f76de3080a29322905960213437ff166333cba37 100644 (file)
@@ -33,7 +33,10 @@ class BlogEntryCommentModerator(CommentModerator):
     email_notification = True
 
     def moderate(self, comment, content_object, request):
     email_notification = True
 
     def moderate(self, comment, content_object, request):
-        return True
+        if request.user.is_authenticated():
+            return False
+        else:
+            return True
 
 moderator.register(BlogEntry, BlogEntryCommentModerator)
 
 
 moderator.register(BlogEntry, BlogEntryCommentModerator)