Check canAbandon and canRestore with PermissionBackend

Change-Id: I22bccfbc3238912521b8e41d83a86cab309a51ea
This commit is contained in:
Shawn Pearce
2017-02-18 15:57:42 -08:00
committed by David Pursehouse
parent 3008aac922
commit b665f7d455
5 changed files with 28 additions and 40 deletions

View File

@@ -244,7 +244,7 @@ class ChangeApiImpl implements ChangeApi {
public void abandon(AbandonInput in) throws RestApiException {
try {
abandon.apply(change, in);
} catch (OrmException | UpdateException e) {
} catch (OrmException | UpdateException | PermissionBackendException e) {
throw new RestApiException("Cannot abandon change", e);
}
}
@@ -258,7 +258,7 @@ class ChangeApiImpl implements ChangeApi {
public void restore(RestoreInput in) throws RestApiException {
try {
restore.apply(change, in);
} catch (OrmException | UpdateException e) {
} catch (OrmException | UpdateException | PermissionBackendException e) {
throw new RestApiException("Cannot restore change", e);
}
}