# HG changeset patch # User Raimund Renkert # Date 1378464878 -7200 # Node ID b199946e9654e38b9733d27db31af04b11ded65c # Parent c0357bd00666e8e9f59b090cf07ad05bebd292eb Fixed LProbe service. Send all visible objects if no parameter is set. diff -r c0357bd00666 -r b199946e9654 src/main/java/de/intevation/lada/rest/LProbeService.java --- a/src/main/java/de/intevation/lada/rest/LProbeService.java Thu Sep 05 17:36:28 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/LProbeService.java Fri Sep 06 12:54:38 2013 +0200 @@ -143,13 +143,17 @@ try { AuthenticationResponse auth = authentication.authorizedGroups(header); - QueryBuilder builder = - new QueryBuilder( - repository.getEntityManager(), - LProbeInfo.class); - MultivaluedMap params = info.getQueryParameters(); if (params.isEmpty() || !params.containsKey("qid")) { + QueryBuilder builder = + new QueryBuilder( + repository.getEntityManager(), + LProbeInfo.class); + builder.or("fertig", true); + List netzbetreiberIds = auth.getNetzbetreiber(); + for (String netzbetreiberId: netzbetreiberIds) { + builder.or("netzbetreiberId", netzbetreiberId); + } return repository.filter(builder.getQuery()); } String qid = params.getFirst("qid");