[1.7] Allow Review UIs to decide whether they're usable on a case-by-case basis.
Review Request #6007 — Created June 17, 2014 and submitted — Latest diff uploaded
ReviewUI
subclaseses can now define ais_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 onextra_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.
Diff Revision 1
This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.
orig
1
2
reviewboard/reviews/views.py |
---|
reviewboard/reviews/templatetags/reviewtags.py |
---|
reviewboard/reviews/ui/base.py |
---|
reviewboard/templates/reviews/review_request_box.html |
---|