Fix editing close descriptions when a review request is closed.
Review Request #4911 — Created Nov. 7, 2013 and submitted — Latest diff uploaded
Fix editing close descriptions when a review request is closed.
The ReviewRequestEditor's editable field was recently changed to factor
in whether a user has permissions to edit the review request, and
whether the review request was open. This broke editing close
descriptions for closed review requests, since that depended on the
editable property as well.Internally, Review Board has separate permissions for the abilities to
close review requests (and alter their close descriptions), and edit
review requests. That's now replicated in the JavaScript.Instead of passing editable to the ReviewRequestEditor when
initializing, it passes mutableByUser and statusMutableByUser, and it
then calculates editable and statusEditable. The field editors can
respect either of these fields, depending on which field it is.
Tested with both open and closed review requests.
Unit tests pass.