Check labels during PostReview with PermissionBackend

This isn't sufficient to completely remove the label range code from
ChangeControl and RefControl as there are many callers. This commit
covers users setting labels through the REST API and web UI.

Change-Id: I25f17eef610ddcd30918bc4532d24876779e6a3e
This commit is contained in:
Shawn Pearce
2017-02-18 17:30:34 -08:00
committed by David Pursehouse
parent 990bf6146e
commit 9d58a38670
6 changed files with 268 additions and 47 deletions

View File

@@ -214,7 +214,7 @@ class RevisionApiImpl implements RevisionApi {
public void review(ReviewInput in) throws RestApiException {
try {
review.apply(revision, in);
} catch (OrmException | UpdateException | IOException e) {
} catch (OrmException | UpdateException | IOException | PermissionBackendException e) {
throw new RestApiException("Cannot post review", e);
}
}