if (domain == null) {
// TODO: Should we allow a non-admin to list their own projects??
throw new WebApplicationException(Status.FORBIDDEN);
}
Projects response = new Projects();
response.projects = Lists.newArrayList();
for (ProjectData data : authRepository.getProjects().list()) {
if (data.getDomainId() != domain.getId()) {
continue;