Fish Trophy

chipx86 got a fish trophy!

Fish Trophy

[2.0] Allow Review UIs to decide whether they're usable on a case-by-case basis.

Review Request #6006 — Created June 17, 2014 and submitted

Information

Review Board
release-2.0.x
c64ad36...

Reviewers

ReviewUI subclaseses can now define a is_enabled_for() function, which
returns whether it can be enabled for the given user, review request,
and/or file attachment. This allows, for instance, limiting a review UI
based on extra_data on an object, or based on the given user or
Local Site, or anything else.

Tested this with a file attachment returning True, and then returning False.

Implemented a custom version and tested by file attachment name.

Description From Last Updated

list comprehension redefines 'file_attachment' from line 580

reviewbotreviewbot
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/templatetags/reviewtags.py
    
    Ignored Files:
        reviewboard/templates/reviews/parts/file_attachment_thumbnail.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/templatetags/reviewtags.py
    
    Ignored Files:
        reviewboard/templates/reviews/parts/file_attachment_thumbnail.html
    
    
  2. reviewboard/reviews/views.py (Diff revision 1)
     
     
    Show all issues
     list comprehension redefines 'file_attachment' from line 580
    
  3. 
      
chipx86
chipx86
david
  1. Same questions as on the 1.7 version.

  2. 
      
chipx86
Review request changed
Status:
Completed