diff --git a/java/com/google/gerrit/server/restapi/change/ListChangeComments.java b/java/com/google/gerrit/server/restapi/change/ListChangeComments.java index 78ec451e4f..ef5ce619ff 100644 --- a/java/com/google/gerrit/server/restapi/change/ListChangeComments.java +++ b/java/com/google/gerrit/server/restapi/change/ListChangeComments.java @@ -57,17 +57,12 @@ public class ListChangeComments implements RestReadView { @Override public Response>> apply(ChangeResource rsrc) throws AuthException, PermissionBackendException { - if (!rsrc.getUser().isIdentifiedUser()) { - throw new AuthException("Authentication required"); - } + /** List change comments does not require authentication */ return Response.ok(getAsMap(listComments(rsrc), rsrc)); } - public List getComments(ChangeResource rsrc) - throws AuthException, PermissionBackendException { - if (!rsrc.getUser().isIdentifiedUser()) { - throw new AuthException("Authentication required"); - } + public List getComments(ChangeResource rsrc) throws PermissionBackendException { + /** List change comments does not require authentication */ return getAsList(listComments(rsrc), rsrc); }