plone/plone.app.discussion — pull request #38 by evilbungle (2013-11-25 13:17:31+00:00)
Title: Fixing incorrect behaviour with acquired permissions

Unwrapped comments rely on parent attributes to determine their parentage but these attributes are not reliably set by all content objects. This causes unpredictable behaviour when attempting to determine whether anonymous users can view a comment (visible as incorrect comment count in the catalog). This set of changes ensures that correctly wrapped comments are used for security checks.

I've also added a set of tests (based on pull request #26) to clarify the expected acquisition behaviour.