Delete{Reviewer|Vote}: Make permission error more specific
Change-Id: I7d059601c5087f8f7162cca3d1de89db08ffec58
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user