changeset 668:db1c69416eb6

Removed filtering of messstellen.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 20 May 2015 10:14:24 +0200
parents d92abc9bcd41
children 6739e857da57
files src/main/java/de/intevation/lada/rest/stamm/MessstelleService.java
diffstat 1 files changed, 2 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/stamm/MessstelleService.java	Wed May 20 10:13:58 2015 +0200
+++ b/src/main/java/de/intevation/lada/rest/stamm/MessstelleService.java	Wed May 20 10:14:24 2015 +0200
@@ -7,8 +7,6 @@
  */
 package de.intevation.lada.rest.stamm;
 
-import java.util.ArrayList;
-
 import javax.enterprise.context.RequestScoped;
 import javax.inject.Inject;
 import javax.servlet.http.HttpServletRequest;
@@ -26,8 +24,6 @@
 import de.intevation.lada.util.annotation.RepositoryConfig;
 import de.intevation.lada.util.auth.Authorization;
 import de.intevation.lada.util.auth.AuthorizationType;
-import de.intevation.lada.util.auth.UserInfo;
-import de.intevation.lada.util.data.QueryBuilder;
 import de.intevation.lada.util.data.Repository;
 import de.intevation.lada.util.data.RepositoryType;
 import de.intevation.lada.util.rest.Response;
@@ -93,12 +89,7 @@
         @Context HttpServletRequest request,
         @Context UriInfo info
     ) {
-        UserInfo userInfo = authorization.getInfo(request);
-        QueryBuilder<MessStelle> builder =
-            new QueryBuilder<MessStelle>(
-                defaultRepo.entityManager("stamm"), MessStelle.class);
-        builder.or("id", userInfo.getMessstellen());
-        return defaultRepo.filter(builder.getQuery(), "stamm");
+        return defaultRepo.getAll(MessStelle.class, "stamm");
     }
 
     /**
@@ -118,10 +109,6 @@
         @Context HttpServletRequest request,
         @PathParam("id") String id
     ) {
-        UserInfo userInfo = authorization.getInfo(request);
-        if (userInfo.getMessstellen().contains(id)) {
-            return defaultRepo.getById(MessStelle.class, id, "stamm");
-        }
-        return new Response(false, 698, new ArrayList<MessStelle>());
+        return defaultRepo.getById(MessStelle.class, id, "stamm");
     }
 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)