Remove reviewers from a change

- The new UI adds a "Remove" column and an "X" button on each
  reviewer row to ApprovalTable.  Clicking this button will cause
  a remote call to removeReviewer

- Added a new removeReviewer remote method to PatchDetailService

- Both the addReviewer and removeReviewer remote methods use the
  same result class, which I renamed from AddReviewerResult to
  ReviewerResult

- ReviewerResult received a new error type "COULD_NOT_REMOVE"

Note: the error handling of this CL is not optimal for 2 reasons:

- Since PatchDetailService always catches exceptions and adds them
  to an errors field in ReviewerResult, the call always succeeds
  even if it actually failed.

- We can display a dialog box if the removal failed, but it would
  be better simply not to display the Delete button if the user
  doesn't have enough privileges.

A cleaner way to implement this (future change list) would be to
return this information in ChangeDetail so that ChangeScreen will
only display Delete buttons that will actually work.

Bug: issue 218
Bug: issue 289
Change-Id: I38ce63d76a3588c85472f1fd723cd097aeafccb3
This commit is contained in:
Cedric Beust
2010-04-08 13:01:12 -07:00
committed by Shawn O. Pearce
parent 9d823b2e3e
commit 258f15ea85
13 changed files with 202 additions and 23 deletions

View File

@@ -79,7 +79,7 @@ class RequireSslFilter implements Filter {
url = b.toString();
} else {
url = urlProvider.get();
url = urlProvider.get() + req.getServletPath();
}
rsp.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
rsp.setHeader("Location", url);