Check canRebase with PermissionBackend

Change-Id: I09b24e3473c8b45a583cbb7cab57c86ac1b99792
This commit is contained in:
Shawn Pearce
2017-02-18 15:52:35 -08:00
committed by David Pursehouse
parent df11d43964
commit 3008aac922
4 changed files with 29 additions and 23 deletions

View File

@@ -362,7 +362,11 @@ class ChangeApiImpl implements ChangeApi {
public void rebase(RebaseInput in) throws RestApiException {
try {
rebase.apply(change, in);
} catch (EmailException | OrmException | UpdateException | IOException e) {
} catch (EmailException
| OrmException
| UpdateException
| IOException
| PermissionBackendException e) {
throw new RestApiException("Cannot rebase change", e);
}
}

View File

@@ -268,7 +268,11 @@ class RevisionApiImpl implements RevisionApi {
public ChangeApi rebase(RebaseInput in) throws RestApiException {
try {
return changes.id(rebase.apply(revision, in)._number);
} catch (OrmException | EmailException | UpdateException | IOException e) {
} catch (OrmException
| EmailException
| UpdateException
| IOException
| PermissionBackendException e) {
throw new RestApiException("Cannot rebase ps", e);
}
}