Delete{Reviewer|Vote}: Make permission error more specific

Change-Id: I7d059601c5087f8f7162cca3d1de89db08ffec58
This commit is contained in:
David Pursehouse
2016-07-12 11:14:39 +09:00
parent dfd7c8b785
commit d4ea5c3454
3 changed files with 4 additions and 4 deletions

View File

@@ -752,7 +752,7 @@ public class ChangeIT extends AbstractDaemonTest {
setApiUser(user);
exception.expect(AuthException.class);
exception.expectMessage("delete not permitted");
exception.expectMessage("delete reviewer not permitted");
gApi.changes()
.id(r.getChangeId())
.reviewer(admin.getId().toString())
@@ -869,7 +869,7 @@ public class ChangeIT extends AbstractDaemonTest {
setApiUser(user);
exception.expect(AuthException.class);
exception.expectMessage("delete not permitted");
exception.expectMessage("delete vote not permitted");
gApi.changes()
.id(r.getChangeId())
.reviewer(admin.getId().toString())

View File

@@ -163,7 +163,7 @@ public class DeleteReviewer implements RestModifyView<ReviewerResource, Input> {
.append("\n");
}
} else {
throw new AuthException("delete not permitted");
throw new AuthException("delete reviewer not permitted");
}
}

View File

@@ -173,7 +173,7 @@ public class DeleteVote
break;
}
} else {
throw new AuthException("delete not permitted");
throw new AuthException("delete vote not permitted");
}
}
if (psa == null) {