Test permitted labels with PermissionBackend

Use PermissionBackend and its test methods to determine which labels
a reviewer might be able to assign during a review.

Change-Id: I7fe6ba1f45de0d4f04575cdba1ae541304ffd7a2
This commit is contained in:
Shawn Pearce
2017-02-19 12:59:16 -08:00
committed by David Pursehouse
parent 9d58a38670
commit 557a89fb52
10 changed files with 141 additions and 59 deletions

View File

@@ -416,7 +416,7 @@ class ChangeApiImpl implements ChangeApi {
public void addReviewer(AddReviewerInput in) throws RestApiException {
try {
postReviewers.apply(change, in);
} catch (OrmException | IOException | UpdateException e) {
} catch (OrmException | IOException | UpdateException | PermissionBackendException e) {
throw new RestApiException("Cannot add change reviewer", e);
}
}