Fix issues with deleting comments on replies.
Review Request #4138 — Created May 11, 2013 and submitted
Fix issues with deleting comments on replies. We've had some long-standing issues deleting comments on replies. Deleting comments using the reviews/<id>/replies</id>/*-comments/ URLs was supposed to work, but we didn't have any tests covering this and never noticed we didn't have proper has_delete_permissions functions for these resources. The has_delete_permissions functions for comment classe have moved from the subclasses into the base classes. This will ensure that any subclass that enables deletion will do the right thing. While writing tests for this, I also found that our diff comment querying behaved differently from screenshots and file attachments. They were only accessible for public comments or when the requester owned them. This was unnecessary, and we really wanted to return Forbidden in this case. Diff comments have been updated in this case to match what the other comments do.
All unit tests (including the 12 new ones) pass. I also verified this with my ReviewBoxView change for 1.8.
Description | From | Last Updated |
---|---|---|
Col: 80 E501 line too long (103 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (121 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (125 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (143 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (109 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (127 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (131 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (149 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (125 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (114 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (132 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (136 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (154 > 79 characters) |
reviewbot |