Comment Pane Cache: disable caching for the author of the link.

This commit is contained in:
Neil Williams
2012-08-28 15:39:26 -07:00
parent cb1d625b1a
commit 3812f7ba8f

View File

@@ -1049,6 +1049,11 @@ class CommentPane(Templated):
self.can_reply = False
if c.user_is_admin:
try_cache = False
# don't cache if the current user is the author of the link
if c.user_is_loggedin and c.user._id == article.author_id:
try_cache = False
if try_cache and c.user_is_loggedin:
sr = article.subreddit_slow
c.can_reply = self.can_reply = sr.can_comment(c.user)