Check canAbandon and canRestore with PermissionBackend
Change-Id: I22bccfbc3238912521b8e41d83a86cab309a51ea
This commit is contained in:

committed by
David Pursehouse

parent
3008aac922
commit
b665f7d455
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user