From cb99c8ca190e564e0e13cc4690d181914b52dfc2 Mon Sep 17 00:00:00 2001 From: Chad Birch Date: Mon, 1 Apr 2013 14:31:41 -0600 Subject: [PATCH] Don't allow gilding of removed comments This was making it possible to view the author/text of removed comments on the gilding page. --- r2/r2/controllers/front.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/r2/r2/controllers/front.py b/r2/r2/controllers/front.py index 693cd85cc..758587b9f 100755 --- a/r2/r2/controllers/front.py +++ b/r2/r2/controllers/front.py @@ -1391,7 +1391,9 @@ class FormsController(RedditController): if comment: comment_sr = Subreddit._byID(comment.sr_id, data=True) - if comment._deleted or not comment_sr.allow_comment_gilding: + if (comment._deleted or + comment._spam or + not comment_sr.allow_comment_gilding): comment = None start_over = False