Allow admins to see spam on the /comments page

This commit is contained in:
ketralnis
2008-11-20 15:52:08 -08:00
parent 71d9d7718b
commit b758979af3

View File

@@ -563,4 +563,9 @@ class CommentsController(ListingController):
title_text = _('comments')
def query(self):
return Comment._query(sort = desc('_date'))
q = Comment._query(Comment.c._spam == (True,False),
sort = desc('_date'))
if not c.user_is_admin:
q._filter(Comment.c._spam == False)
return q