Fix issues with deleting comments on replies.

Review Request #4138 — Created May 11, 2013 and submitted

Information

Review Board
release-1.7.x

Reviewers

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)

reviewbotreviewbot

Col: 80 E501 line too long (121 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (125 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (143 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (109 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (127 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (131 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (149 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (125 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (114 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (132 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (136 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (154 > 79 characters)

reviewbotreviewbot
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/webapi/tests.py
        reviewboard/webapi/resources.py
      Ignored Files:
    
    
  2. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (103 > 79 characters)
    
  3. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (121 > 79 characters)
    
  4. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (125 > 79 characters)
    
  5. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (143 > 79 characters)
    
  6. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (109 > 79 characters)
    
  7. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (127 > 79 characters)
    
  8. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (131 > 79 characters)
    
  9. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (149 > 79 characters)
    
  10. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (125 > 79 characters)
    
  11. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (80 > 79 characters)
    
  12. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (114 > 79 characters)
    
  13. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (132 > 79 characters)
    
  14. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (136 > 79 characters)
    
  15. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (154 > 79 characters)
    
  16. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.7.x (c8f9748)
Loading...